Repository navigation
fix(mcp): return compact text for untyped tools and bound settle removals - #4246
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apex SentinelVerdict: Since the last review: 1 new · 0 still open · 0 no longer raised 1 finding(s): 1 minor. 🟡 Minor (1)
Reviewed with this repository's own Sentinel configuration ( Reply under an inline comment with Earlier reviewsReview of
|
| Where | Finding |
|---|---|
src/ai-sdk/index.ts:123 |
AI SDK adapter now returns an empty object for every untyped tool call (snapshot, open, get) |
2 findings below minor not shown (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (e6ac165961de).
|
At 510c03a, the change reads correctly: untyped tools return compact text unless machine output is asked for, and typed tools and error results keep
Not blocking, take or leave:
The four earlier inline threads no longer apply at this head and can be resolved; the adapter one is fixed in code, and the test above is what keeps it fixed. |
…he settle removal cap
|
Fixed at f3eeb38.
The four earlier inline threads were already resolved. |
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on f3eeb38. The verdict and the full list are in the summary comment.
|
At f3eeb38 the earlier findings are fixed and I found no new problems. The AI SDK adapter now builds its executor with The settle-removal claim in r4491331147 does not apply: with 9 removals the cap of 8 is exceeded, so 9 lines are kept and Third-party MCP clients that read |
Summary
outputSchema(snapshot,open,get, …) now returns only its compact text on success. It returnsstructuredContentonly when the caller asks for machine output (mcpOutputFormat: json, a non-defaultresponseLevel, orincludeCost). Typed tools and error results keepstructuredContent(ADR 0012). The AI SDK adapter reads results as data, so it asks the executor forstructuredContent: 'always'.Reason: Claude Code 2.1.317 shows the model only
structuredContentwhen both are present, so untyped tools put the raw result (float rects, pids, native class names, log paths) into context instead of the compact text. Codex 0.166 shows only the text.truncatedsays lines were dropped. Added lines, which carry the new refs, keep priority.agent-setup.mdMCP section says whenstructuredContentis returned.structuredContentfrom untyped MCP tools must passmcpOutputFormat: "json".Validation
f3eeb38b58e531406dbbba3c4284692fc82d1c25pnpm check:affected --run --head f3eeb38b58e531406dbbba3c4284692fc82d1c25: passed (exactCommit).structuredContent: 'always'option is removed.snapshot -i10,280 → 1,248 chars,open1,220 → 168 chars model-visible. A captured cross-screenpress --settlegoes 3,824 → 2,794 bytes with the new cap.