Skip to main content
Glama

validate_api_response

Check API response data against an OpenAPI schema definition to confirm it matches the expected structure and catch contract mismatches early.

Instructions

Validate an API response against an OpenAPI schema definition. Checks if the response matches the expected schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesExpected OpenAPI schema
responseYesAPI response data to validate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/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 says the tool 'checks' a match but never states what the result looks like (boolean, error list, path-level failures), how strict or partial schema matching is, or what happens when validation fails — all material 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short and front-loaded, which is good, but the second sentence ('Checks if the response matches the expected schema') is a near-tautological restatement of the first. One sentence would have carried the same information without bloat.

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

Completeness2/5

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

With no output schema and no annotations, the description is the only place to learn what the tool returns, yet it says nothing about the validation result format. For a nested-object, two-required-parameter validator, a caller needs to know whether failures are reported as paths, messages, or a boolean.

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 both required parameters ('schema' and 'response') are already documented in the schema itself. The description adds nothing about the shape or depth of the nested OpenAPI schema accepted, so it does not go beyond structured data.

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 names a specific verb and resource combination: validate an API response against an OpenAPI schema. An agent can tell what the tool does at a glance. However, it offers no differentiation from siblings like test_api_endpoint or batch_test_endpoints, whose purposes overlap with response checking.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus test_api_endpoint or batch_test_endpoints, both of which plausibly involve validating responses. No prerequisites, no exclusions, no context about when schema validation is the right choice over live endpoint testing.

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