Skip to content

Conversation

@codefromthecrypt
Copy link

Motivation and Context

The MCP Inspector client failed tool calls that returned isError: true alongside structuredContent, because the SDK still validated the output schema even on error results.

How Has This Been Tested?

new tests and manual

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Before:

$ node ~/oss/inspector/cli/build/cli.js \
    http://localhost:64345/stream \
    --cli --transport http \
    --method tools/call \
    --tool-name get_repositories
Failed to call tool get_repositories: MCP error -32602: Structured content does not match the tool's output schema: data must have required property 'roots'

Failed with exit code: 1

After:

$ node ~/oss/inspector/cli/build/cli.js     http://localhost:64345/stream     --cli --transport http     --method tools/call     --tool-name get_repositories
{
  "content": [
    {
      "type": "text",
      "text": "No exact project is specified while multiple projects are opened.\n You may specify the project path via `projectPath` parameter when calling a tool. \n If you're aware of the current working directory you may pass it as `projectPath`. \n In the case when it's unobvious which project to use you have to ASK the USER about a project providing him a numbered list of the projects.\n Currently open projects: {\"projects\":[{\"path\":\"/Users/codefromthecrypt/oss/observability-examples/genai-function-calling/spring-ai\"},{\"path\":\"/Users/codefromthecrypt/oss/koog\"},{\"path\":\"/Users/codefromthecrypt/oss/intellij-community/plugins/mcp-server\"}]}"
    }
  ],
  "structuredContent": {
    "projects": [
      {
        "path": "/Users/codefromthecrypt/oss/observability-examples/genai-function-calling/spring-ai"
      },
      {
        "path": "/Users/codefromthecrypt/oss/koog"
      },
      {
        "path": "/Users/codefromthecrypt/oss/intellij-community/plugins/mcp-server"
      }
    ]
  },
  "isError": true
}

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt requested a review from a team as a code owner January 28, 2026 09:04
@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

⚠️ No Changeset found

Latest commit: a9ff608

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 28, 2026

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1428

commit: a9ff608

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant