Your agent needs to extract a nested value from a JSON response, but it hallucinates a field name that doesn't exist. JSON path extraction, validation, and transformation need to operate on actual data structures, not LLM predictions. These tools parse and manipulate real JSON.
All JSON Tools (14)
Your agent gets access to 14 json tools via the /mcp/json/ endpoint. Here's the complete list:
| Tool | Description |
|---|---|
json/validate | Validate Json |
json/prettify | Prettify Json |
json/minify | Minify Json |
json/keys | Get Keys |
json/values | Get Values |
json/get-path | Get Json Path |
json/flatten | Flatten Json |
json/unflatten | Unflatten Json |
json/diff | Json Diff |
json/merge | Merge Json |
json/stats | Json Stats |
json/type | Get Json Type |
json/to-query-string | Json To Query String |
json/from-query-string | Query String To Json |
Agent Scenarios
Here's how real agents use these tools:
1. API response processing agent
A data agent extracts specific fields from nested API responses using JSON path queries.
json/extract
{ "json": "{...}", "path": "data.users[0].email" }
2. Config validation agent
A DevOps agent validates that configuration files contain valid JSON before deployment.
json/validate
{ "json": "{ \"key\": \"value\" }" }
3. Data comparison agent
A QA agent compares two API responses to find differences between expected and actual output.
json/diff
{ "json1": "{...}", "json2": "{...}" }
MCP Setup
Add json tools to your agent in under 2 minutes. Choose your client:
Claude Desktop / Claude Code
Add this to your MCP config:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://api.tinyfn.io/mcp/json/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
Cursor
Go to Settings > MCP and add a new server:
- Type: SSE
- URL:
https://api.tinyfn.io/mcp/json/sse - Headers:
X-API-Key: your-api-key
Tip: Use the category-specific endpoint (/mcp/json/) for the best experience. The all-in-one endpoint (/mcp/all/) works too but has 500+ tools which some clients handle less efficiently.
When to Use These Tools
Use json MCP tools when your agent needs to:
- Guarantee correctness — when wrong answers have real consequences
- Process user data — when you're operating on actual user input, not hypothetical examples
- Maintain consistency — when the same input must always produce the same output
You don't need these tools for casual conversation or rough estimates. Use them when precision matters.
Ready to add json tools to your agent?
Get Free API Key 100 requests/month free. No credit card required.Frequently Asked Questions
Why use tools for JSON when LLMs understand JSON?
LLMs can read and generate JSON, but they struggle with precise operations like path extraction from deeply nested structures, structural diff comparison, and guaranteed-valid formatting.
What JSON operations does TinyFn support?
TinyFn provides JSON validation, formatting/prettifying, minification, path extraction, diffing, key sorting, and structural analysis.
Can TinyFn handle large JSON payloads?
TinyFn processes JSON payloads up to the API request size limit. For very large documents, consider extracting relevant sections before processing.