Skip to content

[BUG] CallToolResult.structuredContent is ignored #4427

@JMLX42

Description

@JMLX42

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: 1.0.60
  • Operating System: Ubuntu 25.10
  • Terminal: Alacritty

Bug Description

When calling MCP tools, the structuredContent field is ignored.

Steps to Reproduce

  1. Run claude --debug
  2. Call an MCP tool that declares outputSchema and returns `{ "content": [], "structuredContent": { ... } }

Expected Behavior

Claude Code inspects CallToolResult.structuredContent when it's set / when Tool.outputSchema is set.

Actual Behavior

Claude Code ignores CallToolResult.structuredContent

Additional Context

● Let me check if there's a glTF API endpoint to list glTFs using the gltf-live-test MCP server:
  [DEBUG] executePreToolHooks called for tool: mcp__gltf-live-test__list_gltfs
  [DEBUG] Executing hooks for PreToolUse:mcp__gltf-live-test__list_gltfs
  [DEBUG] Getting matching hook commands for PreToolUse with query: mcp__gltf-live-test__list_gltfs
  [DEBUG] Found 0 hook matchers in settings
  [DEBUG] Matched 0 unique hooks for query "mcp__gltf-live-test__list_gltfs" (0 before
  deduplication)
  [DEBUG] Found 0 hook commands to execute
  [DEBUG] MCP server "gltf-live-test": Calling MCP tool: list_gltfs
  [DEBUG] MCP server "gltf-live-test": No token data found
  [DEBUG] MCP server "gltf-live-test": Tool call succeeded: {"content":[],"structuredContent":{"bod
  y":{"data":[{"attributes":{"extras":{"createdAt":"2025-07-23T17:03:01","importProgress":0,"import
  Status":"failed","updatedAt":"2025-07-23T17:03:01"}},"id":"0198383d-0a4d-7f23-8f0c-268169207569",
  "relationships":{"asset":{"data":{"id":"0198383d-0a46-79e1-bbd8-96041c1f9390","type":"asset"}},"s
  cene":null,"scenes":{"data":[]}},"type":"gltf"},{"attributes":{"extras":{"createdAt":"2025-07-25T
  16:58:48","importProgress":1,"importStatus":"complete","updatedAt":"2025-07-25T16:58:49"}},"id":"
  01984285-e911-77c0-83c7-b1602886bb2a","relationships":{"asset":{"data":{"id":"01984285-e908-7050-
  a822-9f12d0076ae9","type":"asset"}},"scene":{"data":{"id":"01984285-e9d8-7e12-806f-23f6c0f44ab9",
  "type":"scene"}},"scenes":{"data":[{"id":"01984285-e9d8-7e12-806f-23f6c0f44ab9","type":"scene"}]}
  },"type":"gltf"}],"included":[],"links":{"first":"/api/gltf/?page%5Bnumber%5D=1&page%5Bsize%5D=10
  0","last":"/api/gltf/?page%5Bnumber%5D=2&page%5Bsize%5D=100","next":"/api/gltf/?page%5Bnumber%5D=
  2&page%5Bsize%5D=100","self":"/api/gltf/"}},"status":200},"isError":false}

  [DEBUG] Executing hooks for PostToolUse:mcp__gltf-live-test__list_gltfs
  [DEBUG] Getting matching hook commands for PostToolUse with query:
  mcp__gltf-live-test__list_gltfs
  [DEBUG] Found 0 hook matchers in settings
  [DEBUG] Matched 0 unique hooks for query "mcp__gltf-live-test__list_gltfs" (0 before
  deduplication)
  [DEBUG] Found 0 hook commands to execute
  [DEBUG] Stream started - received first chunk

  ● It seems the API returned no glTFs.

Those logs clearly show that structuredContent is set with the relevant/expected data. And yet Claude Code says the API response is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions