Skip to main content
Glama

Validate Spec

validate_spec
Read-only

Check OpenAPI specs for compliance, or dry-run an import to catch errors and see what would be created—endpoints, schemas, folders—plus format detection and 3.0→3.1 conversion.

Instructions

Validate an OpenAPI specification against the standard. Provide either content to validate directly, or specId to validate an existing spec. Set mode to 'import' for a dry run of import_spec instead: same errors and warnings, plus what would be created (endpoint, schema and folder counts), the detected format and whether a 3.0 → 3.1 conversion happened. Nothing is written either way.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoWhat to check: 'openapi' (default) or 'import'openapi
formatNoFormat hint: 'yaml', 'json', or omit for auto-detection
specIdNoPublic ID (GUID) of an existing spec to validate. If provided, the spec is exported first and then validated.
contentNoThe OpenAPI specification content to validate (YAML or JSON). Provide either content or specId, not both.
convertToOpenApi31NoFor mode 'import': convert a 3.0 document to 3.1 (default false)
shortenSchemaNamesNoFor mode 'import': shorten generated schema names (default false)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.1

TDQS

A4.9/5.0
Behavior5/5

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

The readOnlyHint annotation is reinforced and expanded by the description's explicit 'Nothing is written either way.' The description also discloses what the import mode returns: same errors and warnings, endpoint/schema/folder counts, detected format, and whether a 3.0 to 3.1 conversion happened. This is valuable behavioral context beyond the annotation.

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?

The description is two information-dense sentences with no filler. It front-loads the core purpose, then covers input modes, the import alternate, output details, and the no-write guarantee. Every clause contributes necessary information for correct tool selection and invocation.

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

Completeness5/5

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

Given six parameters, no required fields, no output schema, and a readOnly annotation, the description is complete enough for an agent to invoke correctly. It explains the primary validation path, the specId path, the import-mode dry run, what results are returned, and the side-effect profile. The default-mode return is reasonably inferable from the phrase 'same errors and warnings.'

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful context by explaining the mode='import' behavior, the content-or-specId exclusivity, and what the dry run reports. It mostly leaves individual parameter nuances like format, convertToOpenApi31, and shortenSchemaNames to the schema, which is acceptable given the high coverage.

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

Purpose5/5

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

The description opens with a specific verb, object, and criterion: 'Validate an OpenAPI specification against the standard.' It clearly differentiates this from sibling tools like get_spec, export_spec, and lint_spec by emphasizing conformance validation. The two input modes (content or specId) are stated directly, so an agent can understand what the tool operates on.

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

Usage Guidelines5/5

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

The description explicitly explains when to provide content versus specId, and when to use the import dry-run mode: 'Set mode to 'import' for a dry run of import_spec instead.' It also adds a critical safety clarification—'Nothing is written either way'—which helps an agent decide to use this tool without side-effect concerns. This gives clear decision guidance relative to the closest related behavior.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/routebase-dev/routebase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server