Skip to main content
Glama

UK Data: Code utilities

flatten_list

Read-onlyIdempotent

Flattens a nested list structure into a single-level list by recursively extracting all elements regardless of nesting depth. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
nested_listNoarray, required, the nested list structure to flatten, no units, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered elsewhere. The description adds two pieces of real context beyond the annotations: the recursion is depth-unbounded, and each call consumes 1 credit. It does not discuss ordering of output elements, treatment of empty nested lists, or error behavior.

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?

A single front-loaded sentence describing the transformation, with the credit cost appended in parentheses. Nothing is redundant; the only mild weakness is that the cost note is bolted on rather than integrated.

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

Completeness4/5

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

For a one-parameter, non-destructive utility with no output schema, the description covers what the tool does and its cost. The remaining gap is the unexplained string-accepting variant of the input, which an agent would have to discover from the schema alone.

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

Parameters2/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, but the description actually under-serves the schema: the parameter accepts either an array of strings or a plain string (anyOf), and the description only describes a 'nested list structure', leaving the string form unexplained. That is a case where the description narrows rather than clarifies the parameter contract, so it falls below baseline.

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 ('flattens') and resource ('nested list structure') and defines the result precisely as a single-level list produced by recursive extraction at any depth. The operation is unmistakable and cannot be confused with nearby list utilities such as merge_sorted_lists or sort_numbers, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance, no prerequisites, and no named alternatives. Usage is only implied by the description of the transformation itself, which for a simple one-step utility is adequate but leaves the agent to infer context.

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