Validate Json
validate_jsonValidate a JSON string (keyless, offline). Returns whether it is valid and, if not, the error message and the character position.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON text to validate. |
validate_jsonValidate a JSON string (keyless, offline). Returns whether it is valid and, if not, the error message and the character position.
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON text to validate. |
Changes observed during successful MCP inspections.
Input schema / examplesAdded value: +[
+ {
+ "json": "{\"name\": \"John\", \"age\": 30}"
+ },
+ {
+ "json": "{\"items\": [1, 2, 3], \"valid\": true}"
+ }
+]Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint, openWorldHint, idempotentHint, destructiveHint. The description adds behavioral details about returning validity and error info, which goes beyond annotations. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no redundant information. It is front-loaded with the purpose and efficiently covers key details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple validation tool with one parameter and no output schema, the description sufficiently covers purpose and return values. It could mention common pitfalls like input escaping, but overall it is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description for the json parameter ('The JSON text to validate'). The description adds the qualifiers 'keyless, offline' which provide minor additional context but are not critical given the schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Validate' and the resource 'JSON string', and specifies that it works offline and returns validity, error message, and character position. It effectively distinguishes from sibling tools like format_json and query_json.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for validating JSON strings offline and without keys, but does not explicitly state when to use this tool over alternatives like format_json or query_json, nor does it mention when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.