JSON — 18 Operations for AI Agents
JSON is the connective tissue of software — API payloads, lockfiles, configuration, data exports. act101 treats every key path as an addressable location, so agents pull the one value they need instead of ingesting the whole document.
This page is the canonical reference an AI coding agent uses to refactor, query, and analyze JSON code through the act MCP server. 18 operations available: 0 refactor, 18 query, 0 analysis. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.
Worked JSON examples
act101 reads a JSON document's top-level keys whose value is an object or an array: each one surfaces in the skeleton as a module declaration, named for the key. symbols descends further, reporting every key in the document, top-level and nested alike, as a field, with the JSON string quotes kept in its name. The unit of structure in this grammar is the object key: act101 does not distinguish a key holding a single nested object from a key holding an array of them, so both surface the same way. Each example below is the verbatim output of the command shown, run against the file shown. Query outputs are pretty-printed with the timing block omitted.
Read the top-level keys as a skeleton
stations.json is a seismic network registry with three top-level keys: network, stations, and calibration.
$ act query skeleton stations.json
Before
{
"network": {
"code": "PNSN",
"region": "Cascadia Subduction Zone",
"operator": "Pacific Northwest Seismic Network"
},
"stations": [
{
"code": "RAIN",
"name": "Mount Rainier East",
"lat": 46.8523,
"lon": -121.6402,
"elevation_m": 2400,
"sensor_type": "broadband"
},
{
"code": "TAC2",
"name": "Tacoma Basin",
"lat": 47.2529,
"lon": -122.4443,
"elevation_m": 105,
"sensor_type": "short-period"
}
],
"calibration": {
"last_run": "2026-05-01",
"engineer": "R. Okafor",
"drift_tolerance_ms": 2
}
}
Output
{
"type": "Skeleton",
"declarations": [
{
"kind": "module",
"name": "network",
"range": {
"start": {
"file": "stations.json",
"line": 2,
"column": 14,
"byte_offset": 15
},
"end": {
"file": "stations.json",
"line": 6,
"column": 4,
"byte_offset": 134
}
},
"name_range": {
"start": {
"file": "stations.json",
"line": 2,
"column": 4,
"byte_offset": 5
},
"end": {
"file": "stations.json",
"line": 2,
"column": 11,
"byte_offset": 12
}
}
},
{
"kind": "module",
"name": "stations",
"range": {
"start": {
"file": "stations.json",
"line": 7,
"column": 15,
"byte_offset": 150
},
"end": {
"file": "stations.json",
"line": 24,
"column": 4,
"byte_offset": 504
}
},
"name_range": {
"start": {
"file": "stations.json",
"line": 7,
"column": 4,
"byte_offset": 139
},
"end": {
"file": "stations.json",
"line": 7,
"column": 12,
"byte_offset": 147
}
}
},
{
"kind": "module",
"name": "calibration",
"range": {
"start": {
"file": "stations.json",
"line": 25,
"column": 18,
"byte_offset": 523
},
"end": {
"file": "stations.json",
"line": 29,
"column": 4,
"byte_offset": 615
}
},
"name_range": {
"start": {
"file": "stations.json",
"line": 25,
"column": 4,
"byte_offset": 509
},
"end": {
"file": "stations.json",
"line": 25,
"column": 15,
"byte_offset": 520
}
}
}
]
}
The skeleton reports network, stations, and calibration as module declarations; the scalar fields nested inside each one, such as region or drift_tolerance_ms, don't get their own top-level entry.
List every key in the document as symbols
The same registry nests station-specific keys, such as lat and sensor_type, inside each entry of the stations array.
$ act query symbols stations.json
Before
{
"network": {
"code": "PNSN",
"region": "Cascadia Subduction Zone",
"operator": "Pacific Northwest Seismic Network"
},
"stations": [
{
"code": "RAIN",
"name": "Mount Rainier East",
"lat": 46.8523,
"lon": -121.6402,
"elevation_m": 2400,
"sensor_type": "broadband"
},
{
"code": "TAC2",
"name": "Tacoma Basin",
"lat": 47.2529,
"lon": -122.4443,
"elevation_m": 105,
"sensor_type": "short-period"
}
],
"calibration": {
"last_run": "2026-05-01",
"engineer": "R. Okafor",
"drift_tolerance_ms": 2
}
}
Output
{
"type": "Symbols",
"symbols": [
{
"name": "\"network\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 2,
"column": 3,
"byte_offset": 4
},
"end": {
"file": "stations.json",
"line": 2,
"column": 12,
"byte_offset": 13
}
},
"visibility": "unknown"
},
{
"name": "\"code\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 3,
"column": 5,
"byte_offset": 21
},
"end": {
"file": "stations.json",
"line": 3,
"column": 11,
"byte_offset": 27
}
},
"visibility": "unknown"
},
{
"name": "\"region\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 4,
"column": 5,
"byte_offset": 41
},
"end": {
"file": "stations.json",
"line": 4,
"column": 13,
"byte_offset": 49
}
},
"visibility": "unknown"
},
{
"name": "\"operator\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 5,
"column": 5,
"byte_offset": 83
},
"end": {
"file": "stations.json",
"line": 5,
"column": 15,
"byte_offset": 93
}
},
"visibility": "unknown"
},
{
"name": "\"stations\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 7,
"column": 3,
"byte_offset": 138
},
"end": {
"file": "stations.json",
"line": 7,
"column": 13,
"byte_offset": 148
}
},
"visibility": "unknown"
},
{
"name": "\"code\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 9,
"column": 7,
"byte_offset": 164
},
"end": {
"file": "stations.json",
"line": 9,
"column": 13,
"byte_offset": 170
}
},
"visibility": "unknown"
},
{
"name": "\"name\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 10,
"column": 7,
"byte_offset": 186
},
"end": {
"file": "stations.json",
"line": 10,
"column": 13,
"byte_offset": 192
}
},
"visibility": "unknown"
},
{
"name": "\"lat\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 11,
"column": 7,
"byte_offset": 222
},
"end": {
"file": "stations.json",
"line": 11,
"column": 12,
"byte_offset": 227
}
},
"visibility": "unknown"
},
{
"name": "\"lon\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 12,
"column": 7,
"byte_offset": 244
},
"end": {
"file": "stations.json",
"line": 12,
"column": 12,
"byte_offset": 249
}
},
"visibility": "unknown"
},
{
"name": "\"elevation_m\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 13,
"column": 7,
"byte_offset": 268
},
"end": {
"file": "stations.json",
"line": 13,
"column": 20,
"byte_offset": 281
}
},
"visibility": "unknown"
},
{
"name": "\"sensor_type\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 14,
"column": 7,
"byte_offset": 295
},
"end": {
"file": "stations.json",
"line": 14,
"column": 20,
"byte_offset": 308
}
},
"visibility": "unknown"
},
{
"name": "\"code\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 17,
"column": 7,
"byte_offset": 341
},
"end": {
"file": "stations.json",
"line": 17,
"column": 13,
"byte_offset": 347
}
},
"visibility": "unknown"
},
{
"name": "\"name\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 18,
"column": 7,
"byte_offset": 363
},
"end": {
"file": "stations.json",
"line": 18,
"column": 13,
"byte_offset": 369
}
},
"visibility": "unknown"
},
{
"name": "\"lat\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 19,
"column": 7,
"byte_offset": 393
},
"end": {
"file": "stations.json",
"line": 19,
"column": 12,
"byte_offset": 398
}
},
"visibility": "unknown"
},
{
"name": "\"lon\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 20,
"column": 7,
"byte_offset": 415
},
"end": {
"file": "stations.json",
"line": 20,
"column": 12,
"byte_offset": 420
}
},
"visibility": "unknown"
},
{
"name": "\"elevation_m\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 21,
"column": 7,
"byte_offset": 439
},
"end": {
"file": "stations.json",
"line": 21,
"column": 20,
"byte_offset": 452
}
},
"visibility": "unknown"
},
{
"name": "\"sensor_type\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 22,
"column": 7,
"byte_offset": 465
},
"end": {
"file": "stations.json",
"line": 22,
"column": 20,
"byte_offset": 478
}
},
"visibility": "unknown"
},
{
"name": "\"calibration\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 25,
"column": 3,
"byte_offset": 508
},
"end": {
"file": "stations.json",
"line": 25,
"column": 16,
"byte_offset": 521
}
},
"visibility": "unknown"
},
{
"name": "\"last_run\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 26,
"column": 5,
"byte_offset": 529
},
"end": {
"file": "stations.json",
"line": 26,
"column": 15,
"byte_offset": 539
}
},
"visibility": "unknown"
},
{
"name": "\"engineer\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 27,
"column": 5,
"byte_offset": 559
},
"end": {
"file": "stations.json",
"line": 27,
"column": 15,
"byte_offset": 569
}
},
"visibility": "unknown"
},
{
"name": "\"drift_tolerance_ms\"",
"kind": "field",
"range": {
"start": {
"file": "stations.json",
"line": 28,
"column": 5,
"byte_offset": 588
},
"end": {
"file": "stations.json",
"line": 28,
"column": 25,
"byte_offset": 608
}
},
"visibility": "unknown"
}
]
}
symbols lists all 21 keys in the document, including the two stations' repeated code, lat, and sensor_type keys, each reported as a field with its quotes kept in the name.
Query
18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.
callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch