JSON Navigation Tools
MCPify provides specialized tools for navigating, extracting, and transforming JSON data. Keep AI context tight by extracting exactly what's needed.
Tool Categories
Query & Search
Filter & Extract
Transform & Reshape
Slice & Chunk
Validate & Schema
Navigate & Traverse
Core JSON Tools
json_get_by_path
Extract data using JSONPath expressions. Supports wildcards, filters, and recursive descent.
Parameters
ref- Response reference IDpath- JSONPath expression (e.g.,$.users[*].email)default- Optional default if path not found
Example
{
"tool": "json_get_by_path",
"args": {
"ref": "resp_123",
"path": "$.orders[?(@.status=='pending')].id"
}
}
// Returns: [101, 105, 112]field_extract
Extract specific fields from JSON objects or arrays. Supports nested paths and renaming.
Parameters
ref- Response reference IDfields- Array of field paths to extractrename- Optional field renaming map
Example
{
"tool": "field_extract",
"args": {
"ref": "resp_123",
"fields": ["id", "name", "company.name"],
"rename": {"company.name": "company"}
}
}
// Input: Complex user objects
// Output: [{id, name, company}, ...]array_slice
Extract a slice of an array with Python-like syntax. Supports negative indices and steps.
Parameters
ref- Response reference IDpath- Path to arraystart- Start index (inclusive)end- End index (exclusive)step- Step size (default: 1)
Example
{
"tool": "array_slice",
"args": {
"ref": "resp_123",
"path": "$.results",
"start": 0,
"end": 10,
"step": 2
}
}
// Returns every 2nd item from first 10Complete Tool Reference
| Tool | Purpose | Key Features |
|---|---|---|
| Query & Search Tools | ||
| json_get_by_path | Extract via JSONPath | Wildcards, filters, recursive |
| json_search | Search for values | Fuzzy matching, regex |
| json_list_fields | List all field names | Nested paths, types |
| Filter & Extract Tools | ||
| field_extract | Extract specific fields | Whitelist, rename |
| json_filter_array | Filter array items | Predicates, conditions |
| json_exclude_fields | Remove fields | Blacklist, patterns |
| Transform & Reshape Tools | ||
| json_flatten | Flatten nested structure | Dot notation keys |
| json_unflatten | Restore nested structure | From dot notation |
| json_map_values | Transform values | Functions, mappings |
| Slice & Chunk Tools | ||
| array_slice | Extract array slice | Start, end, step |
| response_chunk | Split into chunks | Size, overlap |
| json_paginate | Create pages | Page size, offset |
| Validate & Schema Tools | ||
| json_validate | Validate against schema | JSON Schema support |
| json_get_schema | Infer schema | From sample data |
| json_diff | Compare JSONs | Deep diff, patches |
| Navigate & Traverse Tools | ||
| json_traverse | Walk JSON tree | Visitors, callbacks |
| json_get_parent | Get parent node | From path |
| json_get_siblings | Get sibling nodes | Same level |
Common Usage Patterns
Progressive Data Extraction
// 1. Fetch API response (gets reference, not data)
const response = await mcpify.call("api.fetch", params);
// 2. Inspect structure
const fields = await mcpify.call("json_list_fields", {
ref: response.ref
});
// 3. Extract only needed fields
const data = await mcpify.call("field_extract", {
ref: response.ref,
fields: ["id", "status", "items[*].name"]
});
// 4. Filter if needed
const filtered = await mcpify.call("json_filter_array", {
ref: response.ref,
path: "$.items",
condition: "status == 'active'"
});Error Field Extraction
// Extract specific error details without full payload
const errorCode = await mcpify.call("json_get_by_path", {
ref: error_ref,
path: "$.error.code"
});
const hint = await mcpify.call("json_get_by_path", {
ref: error_ref,
path: "$.error.hint",
default: "Check parameters and retry"
});Chunked Processing
// Process large dataset in chunks
const chunks = await mcpify.call("response_chunk", {
ref: large_response.ref,
chunk_size: 100,
overlap: 10
});
for (const chunk of chunks) {
const processed = await processChunk(chunk);
results.push(processed);
}Performance Best Practices
DO
- ✓ Use specific JSONPath expressions
- ✓ Extract only needed fields
- ✓ Chain tools for complex operations
- ✓ Use field_extract for multiple fields
- ✓ Cache intermediate results
- ✓ Process in chunks for large data
AVOID
- ✗ Loading entire payloads unnecessarily
- ✗ Multiple calls for related fields
- ✗ Complex JSONPath in tight loops
- ✗ Recursive descent on large data
- ✗ Extracting then filtering (filter first)
- ✗ Processing without chunking