Skip to main content
Glama

x402-flatten

Flatten: Flatten a nested array to a given depth. Provide values and optional depth (default fully flat).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoDepth to process
valuesNoValues to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / depth
      Added value: +{
      +  "description": "Depth to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / values
      Added value: +{
      +  "description": "Values to process",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full disclosure burden. It usefully states the operation and the default behavior (fully flat when no depth is given), but omits how input strings are interpreted, error behavior, and what the response looks like.

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?

One compact sentence, front-loaded with the operation and scope. The 'Flatten:' prefix redundantly repeats the tool name, a minor inefficiency, but nothing else is wasted.

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?

For a simple utility with full schema coverage and no output schema, this is mostly adequate. However, the 'values' parameter is typed as a string with no indication that it should be a JSON/array representation, leaving the input format ambiguous.

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 description coverage is 100%, so the baseline is 3. The description earns above-baseline credit by adding meaningful semantics for 'depth': it is optional and defaults to a full flatten, which the schema's 'Depth to process' does not convey.

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 ('Flatten') and resource ('nested array') with the depth scope, so an agent knows it produces a flattened array. It implicitly distinguishes itself from object-flattening siblings by saying 'array', but never names alternatives such as x402-json-flatten or x402-matrix-flatten.

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?

The description only says to provide values and an optional depth. It gives no when-to-use context, no exclusions, and does not route the agent to any sibling tool for related flattening needs.

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