Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

memory: create_entities, create_relations and add_observations could declare idempotentHint: true

Abierto Apto para principiantes
#5,153 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
78/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, nodejs, typescript
Área
api

Línea de trabajo

Las tres herramientas están declaradas en src/memory/index.ts en v2/main, alrededor de las líneas 797, 842 y 888, donde idempotentHint está actualmente en false. Comprueba que los handlers createEntities, createRelations y addObservations ya omiten el trabajo duplicado y, después, cambia los tres hints a true, igual que las herramientas de borrado. Está terminado cuando las declaraciones están actualizadas y la salida del listado de herramientas del servidor de memoria muestra true para estas tres herramientas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement v2
Which server?

memory (@modelcontextprotocol/server-memory)

Protocol era

Both, or not era-specific

MCP client

mcp-groundtruth's own JSON-RPC stdio client (test harness, protocolVersion 2025-11-25)

The problem

create_entities, create_relations and add_observations declare idempotentHint: false, although a repeated identical call has no additional effect. Clients that respect the hint may therefore decline to auto-retry them, for example after a timeout. The three delete tools already declare idempotentHint: true for the same reason: a repeat has nothing left to do.

All three already skip work that has been done (src/memory/index.ts at bbb701e, the commit tested):

  • createEntities skips names that already exist or repeat earlier in the batch (L517–L532).
  • createRelations skips relations that already exist or repeat in the batch (L534–L564).
  • addObservations skips contents the entity already has (L566–L585).

v2/main at 38569bd still declares false (L797, L842, L888), and the three methods are unchanged between the two commits.

Solution you have in mind (optional)

Set idempotentHint: true on these three tools. Their behaviour doesn't change; only the declared hint does, matching the delete tools.

Which MCP feature does it demonstrate? (optional)

Tool annotations (idempotentHint). Reference servers are widely copied, so their hints are often reused as a model for what each one means.
https://modelcontextprotocol.io/specification/2025-11-25/server/tools

Alternatives or workarounds you have tried

Leaving it as is is safe: clients just retry less than they could. A client could hardcode a per-tool override, but that defeats the purpose of declaring hints on the server.

Already built it locally?

No local change, so no prompt to share. How this was verified:

I tested the three tools against a seeded graph with mcp-groundtruth, a conformance harness I maintain, sandboxed, on Node 24. There were 12 argument sets: existing names with a different type or new observations, duplicates within a batch, a missing relation endpoint, a partly invalid batch, and mixes of new and existing items. In every set a second identical call left the stored graph unchanged, and calls that returned errors wrote nothing. Reports and review.

Reproduce, with Node 24 first on PATH:

git clone https://github.com/shreyasbhakta/mcp-groundtruth && cd mcp-groundtruth
git checkout 9ba8f289e6f11aa1d334c0af57b803548d3883a1
uv run mcpgt prepare memory
uv run mcpgt run memory --audit --observe-concurrent --tool create_entities --tool create_relations --tool add_observations

Limits:

  • Only repeated identical arguments were tested; that is what the hint covers.
  • The concurrent evidence is weak. In 180 two-process attempts the requests overlapped on the wire and none diverged, but the lock file serializes writes.
  • One seed graph and 12 hand-chosen argument sets, on macOS only.

Environment: server built from source at bbb701e and run over stdio; client sends protocolVersion: "2025-11-25" and the server answers with the same; macOS, Node 24.21.0.

Before you submit
  • I searched existing issues and this is not a duplicate.
  • This is a request for this repository or one of its servers, not a new server, the MCP specification or an SDK.
Lenguaje dominante
JavaScript
Estrellas
91.2k
Forks
11.8k
Merge medio
6 h 20 min
PR fusionados (30 d)
117

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/servers

Todos los issues de modelcontextprotocol/servers

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.