Skip to content

get_schema tool truncates large schemas mid-content #4397

@andrazbajec

Description

@andrazbajec

Problem

The get_schema tool truncates large schemas mid-content, cutting off at an arbitrary character limit. This causes incomplete data to be returned without a clear signal that truncation occurred — the response ends mid-word or mid-object with a note saying "Schema truncated. Use the property parameter to focus on specific sections."

This is misleading because:

  1. The truncation note implies using property will help, but for schemas with large oneOf arrays, even targeted queries may still truncate.
  2. An AI assistant reading the truncated output may draw incorrect conclusions from the incomplete data (e.g., concluding a oneOf branch doesn't exist when it was simply cut off).

Example

Fetching creative/preview-render.json truncates mid-way through the third oneOf branch (output_format: "both"). The first two branches (url, html) are returned fully, but the third is cut off mid-sentence.

Fetching creative/preview-creative-response.json truncates mid-way through the "batch" branch, hiding the existence of the "variant" branch entirely.

Expected behavior

Either:

  1. Return the full schema regardless of size, or
  2. If a size limit is unavoidable, truncate only at clean JSON boundaries (e.g., end of a complete oneOf entry) and clearly indicate how many items were omitted (e.g., "Showing 2 of 3 oneOf branches")

Affected tool

get_schema (Addie tool)

Impact

Incomplete schema responses can cause incorrect conclusions about what is and isn't valid in the spec — a correctness issue, not just a UX issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions