Repository navigation
Support request-scoped MCP tool sources - #10981
Open
effect-bot wants to merge 5 commits into
Open
effect-bot wants to merge 5 commits into
effect-bot wants to merge 5 commits into
Conversation
🦋 Changeset detectedLatest commit: 0e38a87 The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
effect-bot
force-pushed
the
v4/next-minor
branch
3 times, most recently
from
November 27, 2026 02:04
f596d89 to
ffb3789
Compare
effect-bot
force-pushed
the
agent/effect-bot/bb789e024884
branch
2 times, most recently
from
November 27, 2026 02:05
5ce45c9 to
72dd3e9
Compare
effect-bot
force-pushed
the
v4/next-minor
branch
2 times, most recently
from
November 27, 2026 02:06
0abe933 to
7fef40f
Compare
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
effect-bot
force-pushed
the
v4/next-minor
branch
from
November 27, 2026 02:37
7fef40f to
bfa66e4
Compare
effect-bot
force-pushed
the
agent/effect-bot/bb789e024884
branch
from
November 27, 2026 03:35
8f59cc4 to
53d5db6
Compare
effect-bot
force-pushed
the
v4/next-minor
branch
from
November 27, 2026 03:46
bfa66e4 to
6ee7bef
Compare
effect-bot
force-pushed
the
agent/effect-bot/bb789e024884
branch
from
November 27, 2026 03:59
53d5db6 to
eeaf7b2
Compare
effect-bot
force-pushed
the
v4/next-minor
branch
2 times, most recently
from
November 27, 2026 10:13
70f8345 to
33352ec
Compare
Co-authored-by: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com>
- Route list and call through one `toolSource` lookup in mcpCore and merge source lists without the index bookkeeping. - Share the captured-services merge and the title fallback instead of repeating them, and drop the unreachable `Hidden` recovery. - Infer only the services of a tool source; its error types are fixed. - Fix the tool source tests under `pnpm check` and apply dprint. Co-authored-by: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com>
- Translate a source's `NoSuchElementError` inside the middleware boundary, so middleware sees an MCP error with code -32602 as it does for a hidden tool. - Shadow sourced tools against the registry as it was when the list started, so a tool registered during discovery is not dropped. - List each sourced name once. - Correct the middleware and visibility docs for tool source lists. Co-authored-by: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com>
effect-bot
force-pushed
the
agent/effect-bot/bb789e024884
branch
from
November 28, 2026 04:12
eeaf7b2 to
0e38a87
Compare
This branch has not been deployed
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
Adds
McpServer.toolSourceandMcpServer.registerToolSourceto resolve and dispatch MCP tools per request without mutating server-wide registrations.Behavior
listruns on everytools/listwithout caching between requests, andcalldispatches unregistered tool names matchingowns(default: all unregistered names) without requiring a priortools/list.ownsconsistency: statically registered tools always take precedence over sourced tools (even when hidden by visibility), and a sourced tool is listed only from the first source whoseownsaccepts its name.listandcall(other thanMcpRequestContext) are lifted toMcpRequest<"Requires", ...>. Non-visibility middleware wrapslistwithtarget: "", and per-tool visibility filters the returned tools by name so allowlist visibilities never hide an entire source.listfailures propagate as JSON-RPC errors;callfailures map likeaddTool, withCause.NoSuchElementErrormapped toToolNotFound(-32602) without falling through to later sources.2026-07-28parameter-header checks are skipped for sourced tools.McpServerinternal state (matchingregisterSkill/skillandmiddleware.layerGlobal), keeping hand-writtenMcpServerservices and mocks compatible.Verification
pnpm vitest runacross all 15 Node MCP test suites (McpClient,McpSchema, and allMcpServer/*Node suites): 1199 passed (50 skipped)pnpm tstyche packages/effect/typetest/ai/McpServer.tst.ts: 39 passed (92 assertions)pnpm exec oxlinton all modified files: 0 warnings, 0 errorspnpm --filter effect check(tsc -b tsconfig.json): passedCloses #10946
Closes EFF-4372
Co-authored-by: Rhys Sullivan 39114868+RhysSullivan@users.noreply.github.com