Skip to main content
Glama

lint_spec

Lint an OpenAPI or Swagger spec from a path or raw text to surface rule violations with severity, location, and concrete fixes.

Instructions

Lint a spec. Findings have a rule id (OAS1001+), severity (error/warning/info), a JSON pointer, the source line when known, and a concrete fix. Rules cover operationIds, missing or non-2xx responses, path parameters vs the URL template, parameter naming, unused components, untyped schemas, required-not-in-properties, enum/default/example mismatches (checked with a built-in JSON Schema validator), missing descriptions, undefined security schemes, http:// production servers, POST-200 on creation, trailing slashes, duplicate paths and deprecations without a replacement note.

spec is a path inside the allowed directory, or the spec text itself.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spec": "<spec>"
    },
    "name": "lint_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well: it discloses the exact finding fields (rule id in the OAS1001+ range, severity levels, JSON pointer, source line, concrete fix), enumerates the rule families including that enum/default/example checks use a built-in JSON Schema validator, and notes the allowed-directory restriction. The only gap is that read-only-ness is implied by "lint" rather than stated.

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?

The purpose sentence and the parameter clarification are correctly front-loaded and the rule enumeration is dense but genuinely informative for judging coverage. The long mid-paragraph rule list is heavy, yet each item earns its place by telling the agent what will and will not be flagged.

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 single-parameter tool with an output schema, this covers what an agent needs: what is checked, what a finding looks like, and what the input may be. Missing are the ambiguous path-vs-text resolution rule and any indication of severity thresholds or whether findings are paginated.

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 coverage is 0% — the single parameter is only titled "Spec" — so the description's clarification that it is either a path inside the allowed directory or the spec text itself is essential and decisive. It stops short of saying how the tool disambiguates a bare string that could be either, which keeps it from a 5.

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 and resource up front ("Lint a spec") and immediately backs it with the shape of the findings and the rule categories checked. An agent can tell this is the quality-check tool rather than a describe/diff tool, though it never explicitly distinguishes itself from siblings like validate_example.

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 when-to-use or when-not-to-use guidance, and no alternative is named. The reader must infer that this is the pre-publish/style-quality pass versus validate_example or spec_overview from the word "lint" alone.

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