memory: create_entities, create_relations and add_observations could declare idempotentHint: true
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, nodejs, typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Ba công cụ được khai báo trong src/memory/index.ts trên v2/main, khoảng dòng 797, 842 và 888, nơi idempotentHint hiện là false. Hãy kiểm tra xem các handler createEntities, createRelations và addObservations đã bỏ qua công việc trùng lặp hay chưa, sau đó đổi cả ba hint thành true, giống với các công cụ xóa. Hoàn thành khi các khai báo đã được cập nhật và đầu ra liệt kê công cụ của máy chủ bộ nhớ hiển thị true cho ba công cụ này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 91.2k
- Fork
- 11.8k
- Merge trung bình
- 6 giờ 20 phút
- Pull request đã merge (30 ngày)
- 117
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/servers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
modelcontextprotocol/servers#5156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#5134 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/servers#5071 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: git_create_branch is marked non-destructive but silently resets an existing packed branchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/servers#5059 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp-server-fetch: `fetch` prompt returns JSON-RPC error code 0 with the raw exception text for an invalid URLCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#4914 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/servers
Issue tương tự
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
saayam-for-all/webapp#1919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Uuriko/project-room#3728 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(site): Mermaid edge-label contrast on Architecture and a table header on How it comparesĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
devops-thiago/ThrillhouseBot#1132 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
andromarces/agent-loops#886 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày