Skip to main content
Glama
crisjonblvx

enrichrapi-mcp

by crisjonblvx

validate_json_string

Validate JSON strings, detect syntax errors with line and column, and get root type, counts, depth, plus formatted and minified versions.

Instructions

Validate, format, and analyze a JSON string.

Returns whether the JSON is valid, root type, key/item count, nesting depth, a pretty-printed version, and a minified version. On error, returns the line and column of the syntax mistake.

Args: json_string: The raw JSON string to validate (e.g. '{"key": "value"}')

Returns: dict with keys: valid, root_type, key_count, item_count, depth, formatted, minified (or error, line, column), cost_usd

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
json_stringYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it delivers by listing exact response keys (valid, root_type, key_count, item_count, depth, formatted, minified), the error keys (error, line, column), and cost_usd. This goes well beyond the sparse schema and leaves little guesswork about output or failure behavior.

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 front-loads the main action in one sentence, then uses compact structured sections for Args and Returns. Every line carries useful information with no filler or repetition.

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 one-parameter tool with no output schema, the description fully specifies input, output contract, error behavior, and even a cost field. No additional context is needed for an agent to call this tool correctly.

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?

The schema only says 'json_string' is a required string with no description (0% coverage). The description compensates by stating it is the raw JSON string and provides a concrete example, so an agent knows exactly what value to pass.

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 first sentence names a concrete action ('Validate, format, and analyze') and a specific resource ('a JSON string'). It distinguishes this tool from unrelated sibling validators because it is the only one focused on JSON parsing, and the detailed output list makes its scope unambiguous.

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 establishes clear context: use this tool when a caller needs JSON validation, formatting, or structural analysis. It does not explicitly name alternatives or phrase when-not-to-use conditions, but no listed sibling targets JSON, so the intended use case is easy to identify.

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