tokensaver

read_json — JSON APIs and files, shrunk

Parameter
sourceURL (HTTP GET) or local file path
outlineShow the structure — keys, types, array sizes, one example each — instead of the data
selectKeep only these fields (see below)
drop_keysKeys to remove everywhere; names or globs: ["*_url", "node_id"]
max_itemsKeep only the first N items of every array (… 480 more items)
drop_lists_overReplace arrays longer than N with "[480 items omitted]"
max_strCut strings longer than N characters
tableRender arrays of objects as Markdown tables
keep_emptyKeep null, "", [], {} — by default they are dropped
page, max_charsAs for read

select syntax

A small, forgiving path language:

total_count                     a field
items.name                      a field of every element (arrays map implicitly)
items[0]   items[-1]   items[:5]  index / slice
items.{name, owner.login}       pick fields → {"name":…, "owner.login":…}
items.{repo: name, stars: stargazers_count}   pick with aliases
total_count, items.id           several fields at once
items[].tags[0]                 explicit [] maps everything after it (first tag of each item)

Example

read_json source=https://api.github.com/search/repositories?q=mcp outline=true
→ {total_count: number (12340), items: [30] {id: number, name: string ("github-mcp-server"), owner: {…}, …}}
read_json source=… select="items.{full_name, stargazers_count, description}" max_items=5 table=true
→ | full_name | stargazers_count | description | |---|---|---| | github/github-mcp-server | 32860 | GitHub's official MCP Server | …

JSON output is compact: containers that fit on a line stay on one line; bigger ones put one element per line with one-space indentation — close to minified JSON in tokens, but still readable and pageable. API error responses (4xx/5xx) are returned shrunk, so the agent sees the error message itself.

Next: Configuration.