Skip to content

CallToolResponse isError is optional in spec, but not in SDK #1090

Description

@nictownsend

https://modelcontextprotocol.io/specification/2025-06-18/schema#calltoolresult

isError?: boolean
Whether the tool call ended in an error.

If not set, this is assumed to be false (the call was successful).

However -

Assert.notNull(isError, "isError must not be null");

invoked by

@JsonProperty("isError") Boolean isError, @JsonProperty("structuredContent") Object structuredContent,

do not treat the JSON property as optional.

I found this when trying to connect to https://docs.confluent.io/cloud/current/ai/ai-tools/managed-mcp-server.html#global-and-regional-mcp-servers - https://api.confluent.cloud/mcp/v1 using

final HttpClientStreamableHttpTransport.Builder transportBuilder =
            HttpClientStreamableHttpTransport.builder(url).endpoint(url)
                        .clientBuilder(httpClientBuilder);

Note .endpoint(url) needed because the confluent servers don't end in /mcp

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featureneeds reproWe need a way to reproduce the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions