Skip to main content
Glama

validate_json

Check if a string contains valid JSON without modifying it, so you can catch syntax errors before parsing or processing.

Instructions

Check whether a string is valid JSON without modifying it.

Args: json_text: The text to validate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
json_textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose one useful trait (non-mutating), but says nothing about what is returned (a boolean? a parse error with position?) or whether it throws or returns false on invalid input — critical for a validator.

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?

One front-loaded sentence states the action and the non-mutation guarantee, followed by a minimal Args block. No filler or redundant restatement.

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 single-argument utility this is mostly adequate, but with no output schema the description should disclose the return contract (valid/invalid signal, error detail). That gap leaves the agent guessing at how to interpret results.

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 0%, so the description must compensate. 'json_text: The text to validate' restates the parameter name and clarifies it is the input string, but adds no format, encoding, or size guidance beyond the obvious.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Check whether a string is valid JSON') and adds a scope qualifier ('without modifying it'), which implicitly contrasts it with the sibling format_json. It is clear and distinguishable, though it never names the alternative outright.

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

Usage Guidelines3/5

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

The phrase 'without modifying it' hints that a modifying alternative (format_json) exists, so usage is implied but never explicit. There is no statement of when to prefer this over format_json or other JSON-handling siblings.

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