MCP Shipyard
← Rules catalog

MCP outputSchema without an object root: array and primitive schemas

2026-07-28 allows any JSON Schema as outputSchema, but 2025-11-25 clients need an object root. Wrap arrays in an object to stay compatible.

majoroutput.schema-not-objectGeneral

Keep outputSchema.type as "object" and wrap arrays, as in { "items": [...] }. The rule output.schema-not-object is a major finding tagged general. It fails on older revisions and only warns when the server negotiated 2026-07-28.

What you see

  • A scan reports output.schema-not-object per tool: "outputSchema type is array".
  • On a 2026-07-28 server the detail adds "(valid in 2026-07-28, rejected by 2025-11-25 clients)" and the status is a warning.

Why it happens

The 2026-07-28 tools page changed what structured output may be. It says structuredContent "can be any JSON value (object, array, string, number, boolean, or null) that conforms to the tool's outputSchema", and its own example list_users tool returns an array root.

The rule's fix text states that 2025-11-25 clients require an object root, so a server that must work with both eras should keep object roots. That older-client claim comes from the rule, not from a page we re-fetched.

Typical trigger: a list_orders tool whose schema is { "type": "array", "items": {...} }.

Check it yourself

curl -s -X POST https://mcp.acme.example/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
 | jq -r '.result.tools[] | select(.outputSchema != null and .outputSchema.type != "object") | "\(.name)\t\(.outputSchema.type)"'

Fix

Change the schema and the result together:

{
  "type": "object",
  "properties": {
    "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" } } } },
    "next_cursor": { "type": "string" }
  },
  "required": ["items"]
}

Return structuredContent: { "items": [...] } and the same JSON serialised in a text content block, which the tools spec recommends for backwards compatibility. Servers must return results that conform to their schema; if you declare one, clients may validate it.

An object root also leaves room for pagination fields later.

Verify

The jq command prints nothing, then re-scan. If you have no outputSchema at all see output.no-schema.

Which clients care

Tagged general.

Source

MCP tools spec: https://modelcontextprotocol.io/specification/2026-07-28/server/tools

Run a free scan at https://mcpshipyard.com/scan to check every rule at once.

Check every rule at once

A free scan runs this check and the other 152 against your live URL.

Scan a server