Skip to main content
Glama
ackness

Fetch JSONPath MCP

by ackness

fetch-json

Extract specific data from JSON APIs using JSONPath patterns to reduce token usage by fetching only required content from URLs with support for HTTP methods and request customization.

Instructions

Extract JSON content from a URL using JSONPath with extended features. Supports extensions like len, keys, filtering, arithmetic operations, and more. If 'pattern' is omitted or empty, the entire JSON document is returned. Supports different HTTP methods (default: GET).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to get raw JSON from
dataNoRequest body data for POST/PUT/PATCH requests. Can be a JSON object or string.
methodNoHTTP method to use (GET, POST, PUT, DELETE, PATCH, etc.). Default is GET.GET
headersNoAdditional HTTP headers to include in the request
patternNoExtended JSONPath pattern supporting: Basic: 'foo[*].baz', 'bar.items[*]'; Extensions: '$.data.`len`', '$.users.`keys`', '$.field.`str()`'; Filtering: '$.items[?(@.price > 10)]', '$.users[?name = "John"]'; Arithmetic: '$.a + $.b', '$.items[*].price * 1.2'; Text ops: '$.text.`sub(/old/, new)`', '$.csv.`split(",")'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses behavioral traits like default HTTP method (GET), handling of omitted patterns, and support for extended JSONPath features. However, it lacks details on error handling, rate limits, authentication needs, or response formats, which are important for a tool making HTTP requests.

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?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by key features and defaults. Every sentence adds value, such as explaining pattern behavior and HTTP method support, with no redundant or wasted information.

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?

Given the complexity (5 parameters, HTTP operations, JSONPath features) and no annotations or output schema, the description is partially complete. It covers basic usage and features but lacks details on error cases, authentication, rate limits, or return value structure, which are crucial for an HTTP-based tool with extended functionality.

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 description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some context, such as the effect of omitting 'pattern' and default HTTP method, but does not provide significant additional meaning beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Extract JSON content from a URL using JSONPath with extended features.' It specifies the verb ('extract'), resource ('JSON content'), and method ('JSONPath'), and distinguishes itself from sibling tools like fetch-text (which handles text) and batch-fetch-json (which handles multiple URLs).

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?

The description provides clear context for usage: 'If 'pattern' is omitted or empty, the entire JSON document is returned' and 'Supports different HTTP methods (default: GET).' It implies when to use this tool (for JSON extraction with JSONPath) versus fetch-text (for text extraction), but does not explicitly name alternatives or state exclusions, such as when to prefer batch-fetch-json for multiple URLs.

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