Skip to main content
Glama
Specwise MCP Server

Specwise MCP Server

validate_openapi

Read-onlyIdempotent

Validates OpenAPI 3.0/3.1/3.2 or Swagger 2.0 documents, returning all errors with JSON Pointer, line, column, plus lint warnings so API specs can be fixed.

Instructions

Validate an OpenAPI 3.0/3.1/3.2 or Swagger 2.0 document. Returns every error (not just the first) with its JSON Pointer, line and column, plus lint warnings.

Input Schema

NameRequiredDescriptionDefault
specNoThe document as YAML or JSON text (or a JSON object).
spec_pathNoA local file instead of `spec`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds genuinely new behavioral information beyond that: it reports every error rather than the first, includes JSON Pointer plus line/column locations, and also emits lint warnings — useful expectations for an agent planning to parse results.

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?

Two tight sentences with the verb and resource front-loaded, followed by the return contract. Nothing is redundant or padded.

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

Completeness4/5

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

For a two-parameter, read-only validation tool with no output schema, the description covers purpose and the shape of results (per-error pointers, line/column, lint warnings) adequately. The remaining gap is the input-selection rule between `spec` and `spec_path`, which neither the description nor the zero-required-parameter schema resolves.

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%, and the schema itself explains that `spec` is YAML/JSON text or an object and `spec_path` is a local file alternative. The description adds no further meaning, such as precedence when both are provided or the mutual-exclusion/at-least-one rule implied by zero required parameters, so the baseline 3 applies.

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 (validate) and resource (OpenAPI document) and enumerates the supported formats/versions (OpenAPI 3.0/3.1/3.2, Swagger 2.0), which implicitly separates it from validate_json_schema. It never names the siblings diff_openapi or validate_json_schema directly, so the differentiation is scope-based rather than explicit.

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?

Usage is only implied by the resource scope — an agent can infer this is for checking an OpenAPI document for correctness. There is no statement of when to prefer diff_openapi (comparing two specs) or validate_json_schema, and no guidance about prerequisites such as needing either `spec` or `spec_path` supplied.

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

Deploy Server

Other Tools