fix(api): align users MCP tool description - #777
Merged
Conversation
Closed
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
master.users_managementMCP description so every advertised action exists in its schema.SET_ROLES,SET_PASSWORD, andGET_CARTclaims.Benchmark decision
The uncommitted benchmark exercised the real authenticated, stateless MCP endpoint and both production chat adapters with a mock model. It ran on base commit
841b058a5b8aa28022ee434d284308279f097dc1, Node v25.9.0, npm 11.12.1, Apple M4 (10 logical CPUs, 32 GiB), with AI SDK 7.0.83,@ai-sdk/mcp2.0.39, MCP server 2.0.0, Express 5.2.1, and Fastify 5.12.1.Method: three rounds per workload, 25 warm-ups and 200 measured operations per round, plus concurrency-10 runs. The prototype cached only static
ListToolsResultmetadata and still created and closed a newly authenticated client for every request./chat/tools/chat/tools/chat/tools/chat/toolsFirst measured setup calls across the three rounds were 35.376/6.364/5.174 ms for current behavior and 6.146/4.596/6.124 ms for the cold prototype. There were zero benchmark errors and zero net active handles.
Gate result: fail. The prototype saved 4.095 ms at p95 (59.339%), below the required absolute saving of 20 ms. Keeping request-scoped clients and fresh resource context is therefore preferable to adding shared cache state.
Validation
npm exec eslint -- packages/api/src/mcp/tools/users/index.ts tests/mcp.test.jsnpm run build --workspace @unchainedshop/apinpm test --workspace @unchainedshop/api— 95 passedtests/mcp.test.jsintegration run — 11 passed