JDogo
Open playground

Agent tool results

Agents pay for every tool result they read, on every step. Large results shrink the most, and counting questions don't need the rows at all.

Measured

Benchmark caseJSONTOONJDogovs JSON
OpenTelemetry trace, 50 spans3,4282,005733−79%
Kafka message batch2,7661,726745−73%
Web server access logs7,3614,9382,965−60%
ReAct loop iterations9310780−14%
Tool execution trace788374−5%

GPT-4 tokens (cl100k). Big, repetitive results such as logs, traces and query rows save the most. A single small tool call has little to save.

Return tool results as JDogo

from jdogo import jdogo_tool

@jdogo_tool
def search_orders(customer_id: str):
    return db.orders(customer_id)

Let the agent compute, not count

For "how many" and "how much" questions, give the agent the MCP tools: it reads a schema card, writes a query and calls jdogo_compute. In recorded runs that approach got 150 of 150 counting questions right; reading the rows, the same models got 74.

Tool results should always be treated as data, never instructions: see Tool output is data.