fix(toolcraft): add opt-in mcp root prefix omission#277
Merged
Conversation
| @@ -154,8 +154,8 @@ Agent-side configuration example (Claude Code `~/.claude.json` or `.mcp.json`): | |||
|
|
|||
| MCP tool names exposed by this server (derived by toolcraft from `group.name + command.name`): | |||
Contributor
Author
There was a problem hiding this comment.
This explanatory text still describes the old root-prefixed derivation.
Suggested change
| MCP tool names exposed by this server (derived by toolcraft from `group.name + command.name`): | |
| MCP tool names exposed by this server (derived by toolcraft from command path segments below the root group): |
Collaborator
|
@poe-code-agent actually, don't change the default |
Contributor
Author
|
@kamilio done — the default is unchanged now. I updated the PR so Toolcraft still keeps the root group prefix by default, and added Verified with targeted unit tests, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
omitRootToolNamePrefix: trueas an opt-in for single-root MCP servers that want rootless tool names.Fixes #276.
Tests
npm run test:unit -- packages/toolcraft/src/toolcraft.test.ts packages/toolcraft/src/entrypoints-mcp-proxy.test.ts packages/toolcraft/src/human-in-loop/approvals-commands.test.ts packages/toolcraft/src/human-in-loop/mcp-runtime.integration.test.ts packages/toolcraft/src/mcp-proxy-integration.test.ts packages/toolcraft/src/mcp-runtime-options.test.ts packages/toolcraft-openapi/src/define-client.test.ts packages/toolcraft-openapi/src/runtime.test.ts packages/markdown-reader/src/mcp/tools.test.ts packages/terminal-pilot-mcp/src/mcp-tools.test.ts --reporter=dotnpm run test:unit -- packages/terminal-pilot-mcp/src/mcp-server.test.ts packages/markdown-reader/src/mcp/run.test.ts packages/terminal-pilot-mcp/src/mcp-tools.test.ts packages/markdown-reader/src/mcp/tools.test.ts --reporter=dotnpm run lint:typesnpx eslint packages/toolcraft/src/mcp.ts packages/toolcraft/src/toolcraft.test.ts packages/toolcraft/src/entrypoints-mcp-proxy.test.ts packages/toolcraft/src/human-in-loop/approvals-commands.test.ts packages/toolcraft/src/human-in-loop/mcp-runtime.integration.test.ts packages/toolcraft/src/mcp-proxy-integration.test.ts packages/toolcraft/src/mcp-runtime-options.test.ts packages/toolcraft-openapi/src/define-client.test.ts packages/toolcraft-openapi/src/runtime.test.ts packages/markdown-reader/src/mcp/run.ts packages/markdown-reader/src/mcp/tools.test.ts packages/terminal-pilot-mcp/src/index.ts packages/terminal-pilot-mcp/src/mcp-tools.test.tsnpm run test