Skip to content

🐛 fix(mcp): rename tools with spaces to snake_case#78

Merged
marcelsamyn merged 2 commits into
mainfrom
fix/mcp-tool-names
Jun 18, 2026
Merged

🐛 fix(mcp): rename tools with spaces to snake_case#78
marcelsamyn merged 2 commits into
mainfrom
fix/mcp-tool-names

Conversation

@marcelsamyn

Copy link
Copy Markdown
Owner

What & why

The MCP SDK now warns at registration when a tool name contains spaces, flagging it as a future compatibility risk (see SEP: Specify Format for Tool Names). On pnpm dev this surfaced nine warnings.

Nine tools were renamed to match the snake_case convention already used by bootstrap_memory, search_memory, list_open_commitments, etc. Schemas, descriptions, and request/response shapes are unchanged.

Old New
save memory save_memory
retrieve memories relevant for today query_day_memories
read scratchpad / write scratchpad / edit scratchpad read_scratchpad / write_scratchpad / edit_scratchpad
get node / get node sources get_node / get_node_sources
update node / delete node update_node / delete_node

Breaking for any client that calls these tools by name. add, bootstrap_memory, search_memory, search_reference, get_entity, and all commitment/metric/claim tools are unaffected.

How to test

  • pnpm dev — confirm the nine "Tool name validation warning" messages no longer appear.
  • pnpm run build:check — passes (tsc + structured-output check).
  • pnpm run lint — passes.

Checklist

  • build
  • tests / typecheck
  • lint
  • CHANGELOG entry (under [Unreleased] → Changed)
  • README + docs/sdk-consumer-migration.md updated

The MCP SDK now warns at registration when a tool name contains
spaces (see SEP: Specify Format for Tool Names). Renamed nine tools
to match the snake_case convention already used by bootstrap_memory,
search_memory, and the commitment/metric tools. Schemas, descriptions,
and request/response shapes are unchanged.

  save memory                          -> save_memory
  retrieve memories relevant for today -> query_day_memories
  read/write/edit scratchpad           -> {read,write,edit}_scratchpad
  get node / get node sources          -> get_node / get_node_sources
  update node / delete node            -> update_node / delete_node

Breaking for any client that calls these tools by name.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request normalizes MCP tool names to snake_case to comply with the MCP tool-name format specification, updating tool definitions in src/lib/mcp/mcp-server.ts and updating references in CHANGELOG.md, README.md, and docs/sdk-consumer-migration.md. The review feedback correctly identifies that the search_memory tool was missed in README.md and that the introductory text on line 201 is now outdated. Additionally, the reviewer points out that modifying historical documentation in docs/sdk-consumer-migration.md is misleading and suggests reverting that change and adding a new section at the top of the file to document this breaking change.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md
MCP connects over `GET /sse` and `POST /messages`. Most current tool names are human-readable strings; the first claims-first read-model tool is already snake_case:

- `save memory`: document ingestion using the `POST /ingest/document` schema.
- `save_memory`: document ingestion using the `POST /ingest/document` schema.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While updating save memory to save_memory here is correct, please note that the introductory sentence on line 201 ("Most current tool names are human-readable strings; the first claims-first read-model tool is already snake_case:") is now outdated and incorrect because all tools have been migrated to snake_case. Additionally, the search memory tool on line 204 was missed and still contains a space. Please update both line 201 and line 204 to ensure consistency.

| — | `get_entity` (new) | Single-entity card lookup by `nodeId`. Use after the model has an id from `search_memory` / `bootstrap_memory` and needs the full picture. |

`save memory`, `list_open_commitments`, `retrieve memories relevant for today`, `read scratchpad` / `write scratchpad` / `edit scratchpad`, and the `get node` / `update node` / `delete node` tools are **unchanged**.
`save_memory`, `list_open_commitments`, `query_day_memories`, `read_scratchpad` / `write_scratchpad` / `edit_scratchpad`, and the `get_node` / `update_node` / `delete_node` tools are **unchanged**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Updating the historical PR 3-iii section to use the new snake_case names is misleading and revisionist, as those tools were actually space-separated at that time. Since this is a breaking change for clients calling these tools by name, it should be documented in a new section at the top of this file (which follows a newest-first order), rather than just modifying the historical PR 3-iii section. Please revert this line to keep the historical accuracy of PR 3-iii, and add a new section at the top of the file for the current breaking change.

Suggested change
`save_memory`, `list_open_commitments`, `query_day_memories`, `read_scratchpad` / `write_scratchpad` / `edit_scratchpad`, and the `get_node` / `update_node` / `delete_node` tools are **unchanged**.
`save memory`, `list_open_commitments`, `retrieve memories relevant for today`, `read scratchpad` / `write scratchpad` / `edit scratchpad`, and the `get node` / `update node` / `delete node` tools are **unchanged**.

@marcelsamyn marcelsamyn merged commit f5c807e into main Jun 18, 2026
1 check passed
@marcelsamyn marcelsamyn deleted the fix/mcp-tool-names branch June 19, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant