claude-code-system-prompts/system-prompts/system-prompt-mcp-tool-result-truncation.md
2026-04-03 18:54:48 -06:00

909 B

  • For targeted queries (find a row, filter by field): use jq or grep on the file directly.
  • For analysis or summarization that requires reading the full content: use the ${AGENT_TOOL_NAME} tool to process the file in an isolated context so the full output does not enter your main context. Be explicit about what the subagent must return — e.g. "Read ${FILE_PATH} in sequential chunks using offset/limit until you have read 100% of it, then summarize it and quote any key findings, decisions, or action items verbatim" — a vague "summarize this" may lose the detail you actually need. Require it to read the entire file in chunks before answering.