Skip to content

tool_response_limit does not truncate structuredContent #1932

Closed

Description

@uznog

In v0.68.0, v0.73.0 and main (6370f1f), tool_response_limit truncates only the text blocks in content. structuredContent passes through unchanged (internal/server/content_forward.go#L194-199). An upstream server that returns large structuredContent (for example a Vikunja MCP server) bypasses the limit, and the full payload reaches the client context. Expected: when a response exceeds tool_response_limit, truncate or drop structuredContent too, and point to read_cache for the full result. If the full pass-through is intentional (PR #1861), please add a config option to drop or cap structuredContent.

Activity

  1. added a commit that references this issue on Nov 19, 2026
    fc6e3bc
  2. Dumbris commented on Nov 19, 2026

    @Dumbris
    Member

    Thanks for the clear report and for pointing at the exact lines, @uznog! This was a gap, not an intentional pass-through: #1861 only clarified that output validation doesn't mutate structuredContent. Fixed in #1937: an oversize structuredContent is now held back and delivered as truncated text with a read_cache handle, so tool_response_limit covers it too.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions