Skip to content

fix: accept unambiguous Bash tool aliases in the manifest - #700

Open
30bef100w wants to merge 1 commit into
LibreChat-AI:mainfrom
30bef100w:fix/mcp-hyphenated-tool-identifiers
Open

30bef100w wants to merge 1 commit into
LibreChat-AI:mainfrom
30bef100w:fix/mcp-hyphenated-tool-identifiers

Conversation

@30bef100w

Copy link
Copy Markdown

When an MCP tool is registered as echo_mcp_my-server, Bash exposes it as echo_mcp_my_server. The script can use the Bash name, but the SDK rejects that same name in tool_manifest before making the request.

The Bash runner now accepts an unambiguous normalized alias and resolves it to the registered name before applying caller policy. Exact names still take precedence. Direct-only tools remain blocked, ambiguous aliases are rejected, and the sandbox and replay still receive the registered name.

Addresses the Bash path in LibreChat-AI/LibreChat#18211. LibreChat will pick up the fix after an SDK release and dependency update.

Verification: the new cases reproduced the rejection on main; all 245 focused Jest tests passed with the fix. TypeScript and ESLint passed. The tests cover the SDK-to-Code-API request boundary without a live sandbox. AI assistance was used for implementation and testing.

This branch has not been deployed

No deployments
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