Skip to main content
Glama
koraynar

doc-extract-mcp

by koraynar

validate_json

Validate JSON against a JSON Schema, reporting every error with a JSON Pointer path to fix extraction mistakes in one pass.

Instructions

Validate a JSON string against a JSON Schema (Draft 2020-12).

Reports EVERY validation error with a JSON Pointer path, not just the first, so extraction mistakes can be fixed in one pass.

Args: data: The JSON document to validate, as a string. json_schema: The JSON Schema to validate against, as a string.

Returns {valid, error_count, errors:[{pointer, message, validator}]}; 'pointer' is a JSON Pointer into the data ('' means the document root).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
json_schemaYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

There are no annotations, so the description carries the full burden. It discloses that the tool returns every validation error with JSON Pointer paths, not just the first, and details the exact return structure including the meaning of 'pointer'. It also specifies the schema draft version, providing comprehensive behavioral context.

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 compact and well-structured: a clear purpose line, a behavioral note, then parameter and return documentation. Every sentence adds value, and the core action is front-loaded, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters and an output schema, the description is complete. It covers the input formats, the validation behavior, and the output structure, including the meaning of 'pointer'. No critical information is missing, so an agent can call it correctly without further lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description's explanation of 'data' as the JSON document and 'json_schema' as the schema string provides essential semantic meaning beyond the bare parameter names. It fully compensates for the lack of schema descriptions.

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 states a specific verb ('validate') and resource ('a JSON string against a JSON Schema'), and specifies the schema draft (2020-12). This clearly distinguishes it from the document management siblings, as it describes a validation operation rather than document handling.

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 implies a use case by noting it reports every error 'so extraction mistakes can be fixed in one pass', which guides when to use it. It does not explicitly name alternatives, but the sibling tools are all document-oriented, so the context is sufficient. A slight gap is the absence of explicit 'when not to use' guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/koraynar/doc-extract-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server