Skip to main content
Glama
CaptainCrouton89

MCP Server Boilerplate

json_extract

Extract specific data from JSON files using paths, filters, patterns, or slices to retrieve targeted values, transform data, and analyze specific elements.

Instructions

Extract specific data using paths, filters, patterns, or slices from JSON files. Always use this tool when you need to retrieve particular values, filter arrays/objects by conditions, search for patterns, or slice data. Ideal for targeted data extraction, data transformation, and focused analysis of specific JSON elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the JSON file
pathNoDot notation path to target
filterNoJS condition to filter results (e.g., 'item.age > 18')
patternNoRegex pattern to search for
search_typeNoWhat to search when using pattern
startNoArray slice start index
endNoArray slice end index
keysNoSpecific object keys to extract
default_valueNoFallback if path not found

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what the tool does (extract data using various methods) and mentions use cases (data transformation, focused analysis), but doesn't address important behavioral aspects like error handling, performance characteristics, memory usage with large files, or what happens when multiple extraction methods are combined. It provides basic operational context but lacks depth on behavioral traits.

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?

The description is appropriately sized with three sentences that each serve distinct purposes: stating the core functionality, providing usage guidelines, and describing ideal use cases. It's front-loaded with the main purpose and avoids redundancy. While efficient, it could be slightly more structured with clearer separation between mandatory and optional parameter usage.

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 tool with 9 parameters, no annotations, and no output schema, the description provides adequate but incomplete context. It covers the 'what' and 'when' well but lacks details on 'how' the extraction works, error conditions, return formats, or performance considerations. The description compensates somewhat for the lack of annotations by specifying use cases, but doesn't fully address the complexity of a multi-parameter extraction tool.

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 9 parameters thoroughly. The description mentions the extraction methods (paths, filters, patterns, slices) which correspond to parameters, but doesn't add meaningful semantic context beyond what's in the schema descriptions. It doesn't explain how parameters interact or provide usage examples. Baseline 3 is appropriate when 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 as extracting specific data from JSON files using multiple methods (paths, filters, patterns, slices). It distinguishes from the sibling 'json_read' by emphasizing targeted extraction rather than general reading. The verb 'extract' with the resource 'JSON files' is specific and actionable.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Always use this tool when you need to retrieve particular values, filter arrays/objects by conditions, search for patterns, or slice data.' It also distinguishes from the sibling 'json_read' by specifying this is for 'targeted data extraction' rather than general reading. The 'Ideal for' section further clarifies appropriate contexts.

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

Deploy Server

Other Tools