mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4469
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3135
Author: @ctr-137
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:serve-mcp-bare-tool-name📝 Commits (1)
45167baserve: a bare MCP tool name runs its one tool, and an unoffered name is an error (#3113)📊 Changes
3 files changed (+124 additions, -24 deletions)
View changed files
📝
docs/DETAILS.md(+4 -0)📝
serve/server.py(+56 -24)📝
serve/test_mcp.py(+64 -0)📄 Description
Issue: #3113 (duplicate #3112; the second half of #3075)
Summary
The MCP servers load, the server window lists their tools, and the chat still never runs one. The reproduced cause:
the model writes the tool's bare name (
list_directory), while Strata offers the namespaced route(
filesystem__list_directory).run_with_mcptreated every name that is not inmcp_namesas one of the request'sown tools, returned it as an OpenAI
tool_callsdelta - and the web chat has no handler fortool_calls. Nothingran, and nothing was shown.
Against the real
npx -y @modelcontextprotocol/server-filesystem, with the 14 tools in the prompt:<function=list_directory>strata_mcpevents, a clienttool_callsdelta namedlist_directory, nothing ran<function=filesystem__list_directory>start/call/result, the tool ranThat is the "backend loaded 14 tools, the Web UI never uses them" report in #3113.
What changed
run_with_mcpnow takes the request's own tool names (own_names). A call to one of those goes back to theclient exactly as before - the request's tools still win a name clash.
one offered tool has that bare name, it runs under its namespaced route.
error:result naming the full<server>__<tool>routes, so it can correct itself; the chat page shows the block. Before, the call disappeared.tool_start/tool_args/tool_callevents of an MCP call are still kept off the client stream, and thecontinuation prompt names the route that actually ran, so the call and its result agree.
docs/DETAILS.md: one bullet under "Tools from MCP servers".Only requests with
"strata_mcp": true(the chat page's opt-in) take this path. The default API path is unchanged:a request that declares no MCP opt-in still returns tool calls to its client exactly as before.
Validation
python -m unittest serve.test_mcp- 29 tests, OK, four of them new:echorunsfake__echo, withstart/call/result, no client tool call, and the result in the nextprompt;
nopebecomes anerror:result namingfake__echo, and the model gets a second round;echooffered by two servers is an error naming both routes (no guessing);echokeeps it: the client answers, not the MCP server.The full
servesuite: 852 tests; the only error istest_winjob.TestWinJob(a Windowstasklistcallreturning
Nonehere), the same one as on unmodifiedmain(848 tests).test_keepawakeis timing-flaky under thefull run and passes alone; neither is related to this change. No new skips.
What I left alone
Three neighbouring MCP failure modes are real and worth their own PRs, but are not this change:
serve/web/app.js:407-417: one failedGET /mcpdisables MCP tools for the life of the tab (no retry unless aserver is literally
starting). This can produce the same symptom as #3113.serve/server.py: the hard-codedsvc.mcp.wait(10)in_openaiomits a still-starting server from the first chat.serve/mcp.pyHttpTransport._post:http.client.IncompleteReadis not caught, so a truncated HTTP answer canleave the server on "Starting" instead of "Failed".
Images returned by MCP tools (#2130) and the 10 s start wait are untouched as well.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.