Skip to main content
Glama

Reconstruir JSON aplanado

json-unflatten
Read-onlyIdempotent

Reconstruye JSON anidado a partir de claves con puntos; los índices numéricos crean arreglos. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: aplanar objetos y arreglos anidados en un nivel con claves con puntos (json-flatten-paths). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Rebuilds nested JSON from flat dotted keys; numeric segments and [n] become array indices (max 10,000) unless arrays is false. Conflicting keys and proto/constructor/prototype segments are rejected. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: flattening nested objects/arrays into one level with dotted keys (json-flatten-paths). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
valueYesFlat object (object; required).
arraysNoNumeric keys create arrays (boolean; optional; default true).
separatorNoKey separator (string; optional; default "."; at least 1 chars; up to 4 chars)..

Output Schema

NameRequiredDescriptionDefault
valueNoany JSON value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / value / examples
      Added value: +[
      +  {
      +    "a.b.0": 1,
      +    "a.b.1.c": 2,
      +    "d": 3
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Rebuilds nested JSON from flat dotted keys; numeric segments and [n] become array indices (max 10,000) unless arrays is false. Conflicting keys and __proto__/constructor/prototype segments are rejected. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: flattening nested objects/arrays into one level with dotted keys (json-flatten-paths). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only/idempotent/non-destructive, but the description goes further: it discloses that conflicting keys and __proto__/constructor/prototype segments are rejected, caps array indices at 10,000, and states hard limits (64 KB input, 1 s, 1 MB output). These constraints are not derivable from the schema or annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then When / Not for / Side effects / Deterministic / Limits in a scannable order with zero filler. It is however bilingual-duplicated content (the ES block restates the EN block, which itself mirrors the schema description), plus a meta-note pointing back at inputSchema.description that a reader doesn't need.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter pure-function tool with an output schema, the description covers scope, alternatives, edge cases, determinism and resource limits. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: numeric segments and [n] become array indices with a 10,000 cap, and the arrays=false escape hatch changes behavior. It adds less on 'separator' beyond 'dotted keys', keeping it just below the top.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Reconstruye JSON anidado a partir de claves con puntos') and immediately clarifies the array-index behavior. It explicitly names the inverse sibling (json-flatten-paths) so an agent can distinguish the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'Cuándo' section scoping it to exact transform/compare/inspect work on structured data, and an explicit 'No para' naming json-flatten-paths as the alternative with the condition that selects it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources