Skip to content

Tools tab: form rows for array-of-object inputs (currently JSON editor only) #2561

Closed

Description

@ashokjayaprakash

Which client?

Web

The problem

Tool inputs that are an array of objects — e.g. a list of line items — always render as a raw JSON editor in the Tools tab (SchemaForm sends any array that isn't a string-enum or const-option array to the JSON fallback). The editor gives no hint of the item shape: no field names, types, required fields or descriptions, although all of them are in the schema. You have to read the schema elsewhere to know what to type, and these list-shaped inputs are often a tool's most important argument.

Example input schema (as emitted by Rust schemars; Pydantic and reused Zod schemas produce the same $defs/$ref shape):

{
  "type": "object",
  "properties": {
    "email": { "type": "string" },
    "items": { "type": "array", "items": { "$ref": "#/$defs/Item" } }
  },
  "required": ["email", "items"],
  "$defs": {
    "Item": {
      "type": "object",
      "properties": {
        "sku": { "type": "string", "description": "Product SKU" },
        "quantity": { "type": "integer", "description": "Units to return" }
      },
      "required": ["sku", "quantity"]
    }
  }
}

Today items shows as an empty JSON editor. Seen on @modelcontextprotocol/inspector 2.8.0 (web), over both stdio and Streamable HTTP.

Solution you have in mind (optional)

Render an array whose items is an object schema (inline or via a local $ref) as a list of rows with add/remove, each row using the same indented sub-form SchemaForm already renders for nested objects — field labels, types, required markers and descriptions.

If a full row editor is too much for a first step, either of these would already help:

  • show the resolved item schema (fields, types, required, descriptions) alongside the JSON editor, or
  • pre-fill the editor with a template built from the item schema, e.g. [{"sku": "", "quantity": 0}].

Alternatives or workarounds you have tried

Hand-writing the JSON array after reading the input schema in the Protocol tab or in the server's source. It works, but it is slow and error-prone, especially for required nested fields.

Already built it locally?

No

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is a request for the Inspector itself, not for the MCP specification or an SDK.

Activity

  1. cliffhall commented on Oct 12, 2026

    @cliffhall
    Member

    Triage: Priority Low (total 5)

    • Severity 3 — array-of-object tool inputs fall back to a bare JSON editor with no hint of the item shape
    • Urgency 2 — wanted eventually; the JSON editor works
    • Bonuses: none

    Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

  2. modified the milestones: v2.12.0, v2.11.0 on Oct 12, 2026
  3. self-assigned this
    on Oct 12, 2026
  4. cliffhall commented on Oct 12, 2026

    @cliffhall
    Member

    Shipped in #2707 (merged to v2/main).

  5. ashokjayaprakash commented on Oct 14, 2026

    @ashokjayaprakash
    Author

    @cliffhall Thank you for the prompt solution and fixes. Appreciate your support!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature requestv2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions