Skip to content

MCP tool responses are very large — hard on LLM context budgets #3678

Description

@SebastienMelki

What

Tool responses from https://api.worldmonitor.app/mcp are large enough to consume a significant fraction of an LLM client's context window per call.

Why it matters

  • Context budget: LLM clients (Claude, GPT, etc.) have finite context per conversation. A single tool call returning tens of KB of JSON pushes earlier turns out of context faster, and limits how many tools the model can chain in one task.
  • Latency & bandwidth: large payloads add transfer time, especially on slower connections, and waste tokens on data the user didn't ask about.
  • Cost: every byte returned is a token the user pays for, even when the actual answer is one number.

Repro

Call almost any worldmonitor tool (e.g. get_conflict_events, get_market_data, get_world_brief) with no filters. The response payload is many KB of JSON covering the full dataset.

Suggested directions

A few things that would help, individually or together:

  1. Server-side filters via inputSchema (related to the other issue I'm opening): if get_conflict_events accepted country, since, limit, the LLM can ask for what it actually needs.
  2. Sensible defaults: cap unconfigured calls at e.g. top-N most relevant items rather than dumping the full dataset.
  3. Pagination: standard cursor / next_page shape so clients can ask for more on demand.
  4. Summary mode: an optional summary: true parameter that returns counts and headlines instead of the full record set; the LLM can drill down with a follow-up call.
  5. Field projection: an include/fields parameter so clients can fetch only the columns they care about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions