feat(mcp): advertise output schemas on hosted tools - #673
Conversation
Every hosted tool now declares an object-root outputSchema so tools/list matches the structuredContent we already return. Stdio tools that share a result shape get the same schema. The SDK validates successful calls against it; error results are unchanged.
🦋 Changeset detectedLatest commit: c5d86d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-auth | c5d86d1 | Commit Preview URL Branch Preview URL |
Aug 14 2026, 05:26 PM |
In plain terms
OpenAI's plugin scan expects every tool that returns structured data to advertise an
outputSchema. We already returnstructuredContenton every hosted call; this PR names that shape so ChatGPT can validate results and reason about follow-up calls. Fixes #671.What it does / what it is not
outputSchemaon every hosted MCP tool (put,comment,list, galleries, metadata, usage, …).put,list,delete, metadata, galleries, …). Stdio-only tools (screenshot,attach,staged,doctor) stay schema-less.commentdocumentsposted/reason/actionso honest declines (not_installed,not_authorized,forbidden) stay structured results, not thrown errors.type: objecton purpose: a oneOf root would make the 2025-era codec wrap results as{ result: … }.How to try it
After deploy,
tools/listonhttps://agents.uploads.sh/mcpincludesoutputSchemaon each tool. Acommentdecline is still{ posted: false, reason: "not_installed" }(or similar), not a protocol error.Test plan
pnpm --filter @uploads/mcp test(116)pnpm --filter @buildinternet/uploads exec vitest run test/mcp.test.ts test/mcp-screenshot.test.ts(88)pnpm --filter @uploads/mcp typecheckandpnpm --filter @buildinternet/uploads typecheck