Skip to main content
Glama

check_api

Verify generated code against indexed OpenAPI schemas to catch invalid endpoints, wrong HTTP methods, missing parameters, deprecations, and version conflicts before runtime.

Instructions

Verify agent/generated code against indexed OpenAPI schemas and documentation. Detects invalid endpoints, wrong HTTP methods, missing required parameters, deprecations, removed APIs, version syntax conflicts, and response assumptions. Distinguishes verified, warning, mismatch, and insufficient_evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoThe generated code snippet, route handler, or API client call to verify.
formatNoResponse format: "markdown" (default, human/agent-readable documentation) or "json" (structured raw machine data).
libraryNoTarget library or SDK name (e.g. "stripe", "next").
projectNoWorkspace root directory to auto-resolve project dependencies and versions.
snippetNoAlternative alias for code snippet.
versionNoTarget documentation/API version (e.g. "v14", "v15", "1.0"). If omitted, project version is auto-detected.
filePathNoOptional path of the file being verified for context.
languageNoProgramming language of the code (e.g. "typescript", "javascript", "python", "curl").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.3
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "Response format: \"markdown\" (default, human/agent-readable documentation) or \"json\" (structured raw machine data).",
      +  "enum": [
      +    "markdown",
      +    "json"
      +  ],
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.1.7
    • addedInput schema / properties / snippet
      Added value: +{
      +  "description": "Alternative alias for code snippet.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "code"
      -]
  3. First observedv0.1.4

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses detection categories and four result classifications (verified, warning, mismatch, insufficient_evidence), which is useful, but omits side-effect profile, permissions, and output format details beyond what the schema enum provides.

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 front-loaded sentences: the first states purpose, the second enumerates detection and classification behavior. No filler or repetition.

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?

The description provides adequate context for a verification tool, covering purpose, detection categories, and result statuses. However, for an 8-parameter tool with no required parameters and no output schema, it leaves gaps around parameter interactions (e.g., code vs snippet alias, project/version auto-detection) and when to prefer json vs markdown.

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 the schema already documents all 8 parameters. The description adds no parameter-level meaning beyond the schema, which meets the baseline of 3.

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?

Names a specific verb ('Verify') and resource ('agent/generated code against indexed OpenAPI schemas and documentation'), and the listed detection categories make its scope distinct from retrieval-oriented siblings like find_api or search_docs.

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?

Describes what the tool does but gives no explicit when-to-use guidance, prerequisites, or alternatives to sibling tools. Usage is only implied by the verb 'Verify' applied to generated code.

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