← All examples Levirge Search · examples

The oversized source

One request, two costs: the GitHub compare endpoint answers with 1.26 MB — roughly 315k tokens. select trims it server-side to 28 KB, the fields alone, with the nested shape intact. Re-verified 8 Aug 2026, provenance included.

1

The research question

"Summarise what changed between these two releases." The GitHub compare endpoint has the answer — wrapped in 52 commits with author objects, trees and verification blocks, then 183 per-file patches. The source itself is the problem. Captured payloads, re-verified 8 Aug 2026.

2

One request, two costs

Fetched whole, the response overflows the agent's context. The jq-lite path commits[].commit.message reaches into every array element server-side and preserves the nested shape, so rows stay aligned. Same request, side by side:

without select 1.26 MB · ~315k tokens
// the same request, no select
fetch("https://api.github.com/repos/ggml-org/llama.cpp/compare/b10256...b10308")

// returns — truncated
{ "url": "https://api.github.com/repos/…",
  "html_url": "…", "permalink_url": "…",
  "diff_url": "…", "patch_url": "…",
  "base_commit": { "sha": "…", "node_id": "…",
    "commit": { "author": {…}, "committer": {…},
      "tree": {…}, "verification": {…} }, … },
  "merge_base_commit": {…},
  "status": "ahead", "ahead_by": 52,
  "commits": [
    { "sha": "22dc605c4ead…", "node_id": "…",
      "commit": {…}, "author": {…},
      "committer": {…}, "parents": […] },
    … 51 more ],
  "files": [
    { "sha": "289e5144e63c…",
      "filename": ".github/workflows/build-apple.yml",
      "blob_url": "…", "patch": "@@ -541,7 +541,9 @@ …" },
    … 182 more ] }
with select 28 KB · ~7k tokens
// the same request, with select
fetch("https://api.github.com/repos/ggml-org/llama.cpp/compare/b10256...b10308",
      select: ["ahead_by", "total_commits",
               "commits[].sha", "commits[].commit.message"])

// returns
{ "ahead_by": 52,
  "total_commits": 52,
  "commits": [
    { "sha": "22dc605c4ead…",
      "commit": { "message":
        "ci: fix vulkan llvmpipe runs (#26533)" } },
    { "sha": "935cad6497e8…",
      "commit": { "message":
        "llama : move n_vocab from llama_sampler…" } },
    … 50 more ] }
45× smaller — the trim happens server-side; the megabyte never reaches the agent.
3

Measured improvement, and where this came from

28 KB (~7k tokens) reached the agent instead of 1.26 MB (~315k) — the answer to the question, with every commit message intact. The source stays cached for 24 hours, so follow-ups are free. The finished summary built from exactly this payload is the nightly release digest.

provenance 8 Aug 2026
client      Claude Code over MCP
re-verified 8 Aug 2026 — schema: true → commits[] $items: 52 · files[] $items: 183;
            select rerun → identical ahead_by: 52 payload
source      full 1.26 MB response linked above — check the trim yourself
retention   body cached server-side · 24 h