Skip to main content
Glama

util_jsonpath

Read-only

JSONPath query — Run a JSONPath query on JSON you pass (json=, URL-encoded) or fetch (url=, up to 2 MB). Supports $, .name, [quoted], [n], [-n], [a,b], [start:end:step], *, .. deep scan and [?(@.price<10 && @.inStock)] filters (== != < <= > >= && || !, @.x.length). Returns each match with its normalized path; values_only=true for a flat list, limit= up to 1000. Safe: no script evaluation. Price: $0.001 USDC (Base, via x402).

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": {
      "json": "<json>",
      "path": "<path>"
    },
    "name": "util_jsonpath"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYes{"items":[{"id":1,"price":5},{"id":2,"price":12}]}
pathYes$.items[?(@.price<10)].id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is partly covered; the description still adds real value by asserting 'Safe: no script evaluation', a 2 MB fetch cap, a 1000-match limit, and a $0.001 USDC x402 payment requirement — a cost trait no annotation conveys. It does not explain failure behavior (invalid JSON, unsupported syntax, oversized fetch) or whether the payment is charged on error.

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 dense, front-loaded paragraph with no filler; the capability list, safety note, and price each carry distinct information. The parenthetical operator enumeration is long but functional, and the pricing tag is separated at the end where it belongs.

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 correctly compensates by describing the return shape: each match plus its normalized path, or a flat list via values_only, capped by limit. The remaining gap is that three advertised knobs (url, values_only, limit) have no counterpart in the two-parameter schema, leaving the agent unsure whether they are accepted.

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 coverage is 100% with inline examples for both parameters, so the baseline would be 3. The description earns above that by enumerating the supported JSONPath surface ($, .name, [quoted], [n], [-n], [a,b], [start:end:step], *, recursive descent, and filter operators == != < <= > >= && || !, @.x.length), which the schema example alone does not convey. It is docked because it references parameters that do not exist in the schema (url=, values_only=true, limit=), which can mislead an agent composing arguments.

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

Purpose5/5

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

The description opens with a specific verb+resource: 'Run a JSONPath query on JSON you pass (json=, URL-encoded) or fetch (url=, up to 2 MB).' It is immediately distinguishable from sibling JSON utilities like util_json_diff and util_json_schema, which transform or validate rather than query.

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?

It states the two input modes (inline JSON vs. fetch by URL, with a 2 MB cap), which implicitly tells the agent when this tool applies. However, it never names an alternative or an exclusion condition, and the 'url=' mode it advertises is not present in the required-parameter schema, so the agent gets no guidance on resolving that mismatch.

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