Document body truncation behavior in MCP tool schemasbacklog_item

documentationmcpagent-dx
1 min read · Edit on Pyrite

Document body truncation behavior in MCP tool schemas

Problem

Large entry bodies are truncated to ~8K characters in MCP responses. Agents must use `body_offset` to paginate through the rest, but this behavior isn't documented in the MCP tool schema descriptions. Agents discover it only when they notice truncated content.

Solution

1. Add truncation notice to `kb_get` and `kb_search` tool descriptions in `tool_schemas.py` 2. Include `body_truncated: true` and `body_total_length: N` fields in truncated responses 3. Document the `body_offset` pagination pattern in the tool schema's `description` field

Files

  • `pyrite/server/tool_schemas.py` — tool descriptions
  • `pyrite/server/mcp_server.py` — truncation response fields