Splice observed shapes into the MCP result envelope - #1765
Closed
RhysSullivan wants to merge 1 commit into
Closed
Conversation
Contributor
Cloudflare previewTorn down — the PR is closed. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 4566b5a | Commit Preview URL Branch Preview URL |
Aug 27 2026, 06:38 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 4566b5a | Aug 27 2026, 06:39 AM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Collaborator
Author
|
Superseded by the MCP data-contract change (semantic data + core-owned result encoding): with data unwrapped to the payload, MCP tools fall under the plain undefined-schema serve rule and the slot splice is unnecessary. Test fixture and e2e journey carry over to the new PR. |
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.
Follow-up to #1759, covering the case the Blacksmith post actually benchmarked: MCP tools whose servers declare no output schema. Those tools were excluded from muscle memory because the MCP plugin always synthesizes a CallToolResult envelope schema — declared as far as the serve rule could tell, but with an untyped
structuredContentplaceholder.Slot mechanism (generic, in the serving layer) —
SHAPE_SLOT_KEY(x-executor-shape-slot) marks a placeholder subschema inside a declared schema.tools.schemanow has a second serve path: when a declared output schema carries marked slots, the observed shape's counterpart at the same path is spliced into exactly those slots, keeping the declared structure around them. Markers are stripped before serving either way;outputSchemaSource: "observed"is set only when a slot was actually filled. Kept out of plugin internals deliberately so it ports through the planned plugin-system removal.MCP plugin — implements the previously-unused
projectToolSchemahook: when the persisted envelope'sstructuredContentis the synthesized placeholder (identified byrequirednot listing it, which only happens when the server declared nothing), the slot is marked at read time. No persisted-row change, so every existing catalog row gets the behavior immediately, no refresh needed.Evidence — new integration test (real MCP server over streamable-http through a real executor): cold describe shows the envelope with an untyped slot and no marker leakage; one call; warm describe serves
structuredContent: { value: string; length: number; ok: boolean }withoutputSchemaSource: observed. New e2e scenario (selfhost + cloud, both passing) drives the same journey through the public surfaces with the provenance note asserted. 6 new splice unit tests. NewmakeUndeclaredStructuredMcpServertesting fixture.Known limitation — servers that return their payload as JSON text inside a
contentblock (rather thanstructuredContent) still teach onlytext: string; shape inference does not parse string contents. Typing those would require bounded JSON-in-string inference (contentSchema) — a possible follow-up, noted here so the warm-describe win isn't overstated for text-only servers.Local note: full unit suite green per package; the fully-parallel local run hit 5s-timeout/port-cross-talk flakes in unrelated OAuth-flow tests (pass in isolation) — CI shards are the gate.