memory: create_entities, create_relations and add_observations could declare idempotentHint: true
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Accessibilité débutants
- 78/100
- Type d'issue
- Refactorisation
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- javascript, nodejs, typescript
- Domaine
- api
Piste de recherche
Les trois outils sont déclarés dans src/memory/index.ts sur v2/main, autour des lignes 797, 842 et 888, où idempotentHint vaut actuellement false. Vérifie que les handlers createEntities, createRelations et addObservations ignorent déjà le travail en double, puis passe les trois hints à true, comme les outils de suppression. C'est terminé lorsque les déclarations sont mises à jour et que la sortie de listage des outils du serveur mémoire affiche true pour ces trois outils.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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):
createEntitiesskips names that already exist or repeat earlier in the batch (L517–L532).createRelationsskips relations that already exist or repeat in the batch (L534–L564).addObservationsskips 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.
- Langage dominant
- TypeScript
- Étoiles
- 91.7k
- Forks
- 11.9k
- Merge moyen
- 3 h 48 min
- PR mergées (30 j)
- 180
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de modelcontextprotocol/servers
-
documentation server-memory v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
modelcontextprotocol/servers#5457 ·
Les mainteneurs répondent en général sous 1 jour
-
everything/tasks: tasks/update checks MAX_ANSWER_BYTES against string length, so non-ASCII answers exceed the documented byte budgetPeut-être pris @cliffhall l’a pris aujourd’hui. Ouvertebug server-everything v2
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
modelcontextprotocol/servers#5419 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
memory: lock heartbeat refreshes a lock file the process no longer ownsPeut-être pris @cliffhall l’a pris aujourd’hui. Ouvertebug server-memory v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
modelcontextprotocol/servers#5418 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
memory: add descriptions to the top-level array parameters of create_entities, create_relations, add_observations and delete_observationsPeut-être pris @cliffhall l’a pris aujourd’hui. Ouverteenhancement server-memory v2
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
modelcontextprotocol/servers#5416 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
everything: bind the HTTP transports to loopback by default, with HOST to widenPeut-être pris @cliffhall l’a pris aujourd’hui. Ouverteenhancement server-everything v2
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
modelcontextprotocol/servers#5371 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de modelcontextprotocol/servers
Issues similaires
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 2 jours
-
reproduced
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
anomalyco/opencode#62052 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
strapi/design-system#2084 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour