json_dry_run
Analyze JSON data size breakdown by specifying fields or nested structures. Input a file path and shape object to get byte-level size details for each field, mirroring the shape in the output.
Instructions
Analyze the size breakdown of JSON data using a shape object to determine granularity. Returns size information in bytes for each specified field, mirroring the shape structure but with size values instead of data.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filePath | Yes | Path to the JSON file (local) or HTTP/HTTPS URL to analyze | |
shape | No | Shape object (formatted as valid JSON) defining what to analyze for size. Use 'true' to get total size of a field, or nested objects for detailed breakdown. Examples: 1. Get size of single field: {"name": true} 2. Get sizes of multiple fields: {"name": true, "email": true, "age": true} 3. Get detailed breakdown: {"user": {"name": true, "profile": {"bio": true}}} 4. Analyze arrays: {"posts": {"title": true, "content": true}} - gets total size of all matching elements 5. Complex analysis: { "metadata": true, "users": { "name": true, "settings": { "theme": true } }, "posts": { "title": true, "tags": true } } Note: - Returns size in bytes for each specified field - Output structure mirrors the shape but with size values - Array analysis returns total size of all matching elements - Use json_schema tool to understand the JSON structure first |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"filePath": {
"description": "Path to the JSON file (local) or HTTP/HTTPS URL to analyze",
"type": "string"
},
"shape": {
"description": "Shape object (formatted as valid JSON) defining what to analyze for size. Use 'true' to get total size of a field, or nested objects for detailed breakdown.\n\nExamples:\n1. Get size of single field: {\"name\": true}\n2. Get sizes of multiple fields: {\"name\": true, \"email\": true, \"age\": true}\n3. Get detailed breakdown: {\"user\": {\"name\": true, \"profile\": {\"bio\": true}}}\n4. Analyze arrays: {\"posts\": {\"title\": true, \"content\": true}} - gets total size of all matching elements\n5. Complex analysis: {\n \"metadata\": true,\n \"users\": {\n \"name\": true,\n \"settings\": {\n \"theme\": true\n }\n },\n \"posts\": {\n \"title\": true,\n \"tags\": true\n }\n}\n\nNote: \n- Returns size in bytes for each specified field\n- Output structure mirrors the shape but with size values\n- Array analysis returns total size of all matching elements\n- Use json_schema tool to understand the JSON structure first"
}
},
"required": [
"filePath"
],
"type": "object"
}