Skip to main content
Glama

JSON Filter MCP

json_dry_run

Analyze JSON data size by field using a shape object. Specify fields to get size in bytes, with output mirroring the shape structure for granular insights. Ideal for optimizing JSON handling and storage.

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

NameRequiredDescriptionDefault
filePathYesPath to the JSON file (local) or HTTP/HTTPS URL to analyze
shapeNoShape 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" }

Other Tools from JSON Filter MCP

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/kehvinbehvin/json-mcp-filter'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server