arcade-mcp/libs
Eric Gustin 9bbdbe2b46
Fix outputSchema to conform to MCP spec's object type requirement (#799)
When a stdio server had a tool that didn't return a dict, then:
```
  {
    "code": "invalid_value",
    "values": [
      "object"
    ],
    "path": [
      "tools",
      2,
      "outputSchema",
      "type"
    ],
    "message": "Invalid input: expected \"object\""
  }
```

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the generated `outputSchema` shape for all non-`json` return
types by wrapping them under a `result` property, which may affect
clients/tests expecting primitive/array schemas despite being
spec-correct.
> 
> **Overview**
> Adjusts MCP tool `outputSchema` generation to **always** emit an
object schema, per the MCP spec that `structuredContent` must be a JSON
object.
> 
> `json` outputs remain a direct object schema, while primitive/array
outputs are now wrapped as `{ "type": "object", "properties": {
"result": <inner> } }` (preserving `enum`/`items`), and tests are
expanded to cover these cases. Bumps `arcade-mcp-server` version to
`1.18.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7dd13bd33d6fdf6ebb778e1a3d9167ca89806f55. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-20 15:50:54 -07:00
..
arcade-cli Fix deploy timeout and improve error messages (#770) 2026-03-06 10:03:48 -03:00
arcade-core JSON-safety validation for ToolMetadata.extras (#773) 2026-02-25 09:48:04 -08:00
arcade-evals [TOO-326] Windows papercuts (#768) 2026-02-25 13:18:16 -03:00
arcade-mcp-server Fix outputSchema to conform to MCP spec's object type requirement (#799) 2026-03-20 15:50:54 -07:00
arcade-serve [TOO-522] Supress chardet noizy versioning warning (#792) 2026-03-13 15:56:15 -07:00
arcade-tdk [TOO-326] Windows papercuts (#768) 2026-02-25 13:18:16 -03:00
tests Fix outputSchema to conform to MCP spec's object type requirement (#799) 2026-03-20 15:50:54 -07:00