Skip to main content
Glama

data_flatten_json

Flatten nested JSON objects and arrays into a single-level dictionary with dotted keys for easier data processing and analysis.

Instructions

Flatten nested JSON objects/arrays into a single-level dict with dotted keys. Pass data as a JSON value.

Input Schema

NameRequiredDescriptionDefault
dataYes
separatorNo.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It does not say how arrays are indexed in the flattened keys, what happens on key collisions, whether the input is mutated or copied, or how non-object input is handled. It also leaves the configurable separator behavior implied by 'dotted keys' rather than stated.

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?

Two short sentences, front-loaded with the transformation and followed by the input-passing hint. Efficient with no filler, though the second sentence could have carried the separator detail instead of stopping at the input format.

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

Completeness3/5

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

An output schema exists, so return-shape explanation is not needed, and the tool is conceptually simple. Still, key-generation rules for arrays, collision handling, and separator usage are absent, leaving real behavioral gaps for a transformation whose output is the whole point.

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

Parameters3/5

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

Schema description coverage is 0%, and the 'data' property has no type at all, so 'Pass data as a JSON value' genuinely adds meaning the schema lacks. However, 'separator' is never mentioned despite controlling the produced key syntax, so only half the parameters are covered.

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

Purpose4/5

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

States a specific verb and resource plus the transformation contract: 'Flatten nested JSON objects/arrays into a single-level dict with dotted keys.' That is clearly distinct from data_to_json and data_read_json in the sibling list, though it never names an alternative explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives such as data_read_json or data_to_json. The agent must infer from the name alone that this is the tool for flattening an already-parsed or inline JSON value.

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