Surgically extract exactly what you need from massive JSON payloads. Reduce token usage with precise path-based data extraction.
// Entire 37KB response sent to AI
{
"users": [...500 users...],
"metadata": {...},
"analytics": {...},
"debug": {...}
}
// AI must process everything// JSONPath: $.users[0:5].email // Returns only: [ "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]" ]
Support for wildcards, recursive descent, array slicing, and filtering predicates.
$.store.book[?(@.price < 10)]Extract data based on complex conditions with comparison and logical operators.
$.users[?(@.role=="admin")]Slice arrays, access by index, and extract ranges with Python-like syntax.
$.results[0:10:2]Filter with the built-in JSONPath functions: length, count, match, search and value.
$.items[?length(@.tags) > 2]Navigate deeply nested structures with recursive descent and wildcards.
$..authorMatch strings against regular expressions inside a filter.
$.users[[email protected] =~ /@example\.com$/].emailJSONPath Expression:
$.users[?(@.status=="active")].email
Returns:
[ "[email protected]", "[email protected]", "[email protected]" ]
JSONPath Expression:
$.products[?(@.price > 100)].name
Returns every match; in this sample catalog, five products cost over 100:
[ "Premium Laptop", "Smart TV 65\"", "Gaming Console", "Drone Pro", "Studio Headphones" ]
JSONPath Expression:
$.customers[*].addresses[?(@.type=="billing")].city
Returns:
[ "New York", "San Francisco", "Chicago", "Austin" ]
{
"name": "nav___json_get_by_path",
"description": "Extract values from a cached snapshot using a JSONPath expression",
"inputSchema": {
"type": "object",
"properties": {
"json": {
"description": "JSON data, or the reference string from a previous '_ref' field"
},
"path": {
"type": "string",
"description": "JSONPath expression (e.g., $.users[*].email)"
}
},
"required": ["json", "path"]
}
}// Step 1: Call the API tool. A large response comes back as a reference (_ref).
{ "name": "crm___list_contacts", "arguments": { "limit": 1000 } }
// Step 2: Extract only what you need
{ "name": "nav___json_get_by_path",
"arguments": {
"json": "<_ref from step 1>",
"path": "$..contacts[?(@.subscribed==true)].email"
} }
// Step 3: The agent works from the extracted emails, not 1000 full contactsReduce token usage and keep irrelevant data out of the model's context. Available to agents as nav___json_get_by_path.