Skip to main content
Glama

json_shape

Read-onlyIdempotent

Summarizes the structure of JSON or JSONL files—keys, array lengths, and sample values—so you can inspect large data without reading full contents.

Instructions

Structure of a JSON/JSONL file: keys, array lengths, sample values.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "json_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The phrase 'sample values' usefully signals that actual data values may be returned rather than only a skeleton, but nothing is said about truncation, recursion depth into nested objects, or how JSONL lines are aggregated.

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?

It is a single tight phrase with no redundant wording, and the informative part (what the output contains) comes first. However, the telegraphic style leaves it feeling like a stub rather than a deliberately structured definition.

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 one-parameter read tool with no output schema, the description is the only place return shape can be explained, and it only partially does so. It omits how deeply nesting is traversed, behavior on malformed JSON, and whether large files are sampled or fully scanned, which matters for an agent deciding whether results are complete.

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?

With a single required path parameter and 100% schema description coverage, the schema carries the parameter burden and the baseline of 3 applies. The description adds no format hints (file extension, relative vs absolute path, size expectations) beyond what the schema states.

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

Purpose3/5

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

The fragment names the resource (a JSON/JSONL file) and hints at the return content (keys, array lengths, sample values), but there is no verb, so it reads as a return-value note rather than a statement of what the tool does. It does not distinguish itself from siblings such as file_outline or read_slice, which an agent could plausibly confuse it with.

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 guidance at all: nothing says to call this instead of read_slice for a whole file, or instead of file_outline for structural inspection. The agent must infer the choice from the sibling names alone, which the definition does not reference.

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