Skip to main content
Glama

Mend

Extract values from JSON by path

mend_query_json
Read-onlyIdempotent

Use when you need specific fields from a JSON document without reading all of it: $.users[0].name, $.items[*].id, $.a.b[-1], $.list[1:3], $..email (recursive). Returns each match with its exact path, type and value. Repairs the JSON first if needed, so broken input still works. Up to 100,000 characters.

Input Schema

NameRequiredDescriptionDefault
maxNoMaximum matches to return. Default 50.
pathYesPath such as $.users[*].email, data.items[0], $..id, $.list[-1], $.list[1:3].
textYesThe JSON (or JSON-ish text).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower, and the description still adds real context: it repairs malformed input before extracting, returns path/type/value per match, and caps input at 100,000 characters. It leaves the default match cap (50) to the schema and says nothing about zero-match behavior, which keeps it from a 5.

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

Conciseness5/5

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

Front-loaded with the use case, then path syntax, then return shape, then the repair and size caveats — each clause contributes distinct information with no filler.

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?

With no output schema, the description carries the return contract and does so adequately ('each match with its exact path, type and value'), plus the auto-repair behavior and input size ceiling. Minor gaps remain: behavior on no matches and whether the 50-match default truncates silently.

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 coverage is 100%, so the schema already documents text, path and max; the description's path examples duplicate much of the path description, though labeling $.. as 'recursive' adds a small clarifying gloss. The 100,000-character mention simply restates the text maxLength. Baseline 3 is appropriate when the schema carries the detail.

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+resource ('Extract values from JSON by path') and backs it with concrete path examples ($.users[0].name, $..email, $.list[1:3]), so the operation is unambiguous. It does not name the adjacent siblings (mend_outline_json, mend_check_json, mend_repair_json), so the routing signal is implied by 'without reading all of it' rather than stated.

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

Usage Guidelines4/5

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

'Use when you need specific fields from a JSON document without reading all of it' gives a clear triggering condition and implicitly contrasts with dumping the whole document. It stops short of explicit when-not-to or naming the sibling tools that handle structure/validation instead.

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