Skip to content

Make schema warnings toggleable (and/or remove them completely) #2205

Description

@Izelude

Which client?

Web

The problem

On the tool page when selecting a specific tool there are Schema portability warnings.

This may be helpful in certain cases but it gets very unwieldy when there is a lot of them.
It requires for every tool to first scroll past a long list of output and input schema warnings before getting to the actual input parameters to fill.

Additionally i think the warnings are quite opinionated and actually contradict guidance from major LLM providers.
The main one i am encountering is:

`type` is an array (["string","null"]). The array form is legal JSON Schema, but several MCP clients read `type` as a single string and either reject the tool or drop the constraint.

Fix: Split it into `anyOf` branches, each with a single `type` — `{"anyOf": [{"type": "string"}, {"type": "null"}]}`. (Making the property optional instead is a different contract: absent is not the same as `null`.)

OpenAI documentation specifically mentions that modelling schemas which target their strict json schema restrictions should use union types to model nullable required fields.
(https://developers.openai.com/api/docs/guides/structured-outputs)

Concretely they write:

Although all fields must be required (and the model will return a value for each parameter), it is possible to emulate an optional parameter by using a union type with null.

and give the following example:

...
"unit": {
                "type": ["string", "null"],
                "description": "The unit to return the temperature in",
                "enum": ["F", "C"]
            }
...

Though my main concern is usability i think its worth thinking about if that warning is actually sensible or not entirely.

Either way even if the warning stays i would like to be able to at the very least collapse all the schema warnings (ideally globally not per tool), so i don't have to scroll past them on every tool change.

Solution you have in mind (optional)

Add a global setting to suppress the warnings or globally collapse them.

Alternatives or workarounds you have tried

No response

Already built it locally?

No response

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature requestv2Issues and PRs for v2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions