Skip to main content
Glama

validate_api

Read-only

Lint an OpenAPI, AsyncAPI, Arazzo, or JSON Schema document against the curated best-of-breed ruleset (Spectral) and return the findings. Pass your own ruleset to run rules you own instead of the catalog — which is what you should do before gating on anything.

Input Schema

NameRequiredDescriptionDefault
contextNoOptional: why you are asking. One sentence — the task you are trying to complete, or what you expect to get back. Never included in the answer and never used to rank; it is read only when a result turns out to be wrong, which is when knowing the intent is what makes the report actionable.
documentYesThe API description to operate on — OpenAPI, AsyncAPI, Arazzo or JSON Schema. A YAML/JSON string or an already-parsed object; both are accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Optional: why you are asking. One sentence — the task you are trying to complete, or what you expect to get back. Never included in the answer and never used to rank; it is read only when a result turns out to be wrong, which is when knowing the intent is what makes the report actionable.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / document
      Added value: +{
      +  "description": "The API description to operate on — OpenAPI, AsyncAPI, Arazzo or JSON Schema. A YAML/JSON string or an already-parsed object; both are accepted.",
      +  "type": [
      +    "string",
      +    "object"
      +  ]
      +}
  3. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuine context beyond that: it uses the curated Spectral catalog, it returns findings rather than a pass/fail gate, and it can be overridden with an owned ruleset.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Two tight sentences with the core action front-loaded and no filler; the second sentence carries the actionable override and gating advice. Efficient, though it spends its closing clause on advice rather than filling its more important transparency gaps.

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 read-only linter with no output schema, the description should say something about the shape of the returned findings (severity levels, whether a verdict is returned), yet it only says 'return the findings.' Purpose and ruleset behavior are covered, but the return contract is under-specified.

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 coverage is 100%, so the documented `context` and `document` params are fully explained in the schema and the baseline is 3. The description references a `ruleset` parameter that is not declared in the schema (only implied via additionalProperties), which adds a little meaning but risks confusing the agent about a param it cannot see.

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?

States a specific verb (lint) and the exact resource (OpenAPI, AsyncAPI, Arazzo, or JSON Schema document) plus the rule source (Spectral). An agent can tell what it does, though it never names how it differs from near-neighbors like api_scorecard, api_coverage, or certify_api.

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?

Offers one concrete directive — run your own ruleset 'before gating on anything' — which implies the tool is for pre-gate checking. But it gives no when-not guidance and does not position the tool against the many other validation/scoring siblings, leaving the agent to infer which validator to call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources