Skip to main content
Glama

json_query

Extract specific values from JSON strings using dot-and-index paths, or retrieve a structural summary when no path is given. Use it to pull only needed fields from API responses.

Instructions

JSON 文字列から path 指定で値を抜き出す(jq-lite)。path は 'data.items[0].name' のようなドット + [索引] 記法。paths に複数渡すと各々を抜く。path 省略時は構造の概要(トップのキー一覧や配列長)を返す。API レスポンスの必要な一片だけ取り出す用途。

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_text": "<json_text>"
    },
    "name": "json_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo抜き出す path(例: a.b[0].c)。任意。
pathsNo複数 path をまとめて抜く。任意。
json_textYes対象の JSON 文字列。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses the three distinct behaviors: single-path extraction, multi-path batch extraction, and the omitted-path overview returning top-level keys or array length. It does not say what happens on invalid JSON or a non-matching path, which is the main remaining gap.

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?

Four short sentences, each doing distinct work: identity, path syntax, multi-path behavior, and the no-path mode, followed by the use case. Front-loaded with what the tool is, 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?

A three-parameter, one-required tool with no annotations and no output schema, so the description must cover behavior — and it covers all three modes plus syntax. It leaves error/empty-result behavior and the exact result shape for multi-path calls unstated.

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%, so baseline is 3, but the description adds meaning beyond the schema: it documents the dot-plus-[index] path syntax and, importantly, the behavior when the optional path parameter is omitted. Multi-path behavior is largely a restatement of the schema's own parameter description.

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?

States a concrete verb and resource ('extract a value from a JSON string by path'), self-labels as 'jq-lite', and defines the path dialect with a literal example. An agent can identify the operation without opening the schema.

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?

Gives an explicit use case ('pulling just the needed fragment out of an API response') and explains that omitting path switches to a structural-overview mode, which effectively tells the agent which mode to pick. It stops short of stating when NOT to use it or naming an alternative, though no sibling does path extraction.

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