Skip to main content
Glama
Swagger MCP Server

Swagger MCP Server

by tsiva18

get_api_schema

Retrieve request or response DTO schema definitions by schema name to inspect API data models and validate payload structures.

Instructions

Get request or response DTO schema definitions by schema name.

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": {
      "schemaName": "<schemaName>"
    },
    "name": "get_api_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaNameYesName of the DTO/schema definition

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

C2.9/5.0
Behavior2/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 implies a read, but never resolves a central ambiguity: the single schemaName parameter cannot express whether a request or a response schema is wanted, so it is unclear whether one call returns both, one, or requires a naming convention. Nothing is said about error behavior for missing schemas.

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?

A single front-loaded sentence with zero filler, which is the right size for a one-parameter lookup. It is efficient but verges on under-specified rather than padded.

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

Completeness2/5

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

There is no output schema and no annotations, so the description is the only place to explain what a returned "schema definition" looks like (JSON Schema? DTO fields? both directions?) and it does not. For a tool whose entire value is the returned document, this leaves the agent guessing at the response shape.

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 schema already documents schemaName as "Name of the DTO/schema definition," and the description adds no syntax, casing, or format guidance beyond that. Baseline 3 is appropriate when the schema does the explanatory work.

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?

The description pairs a specific verb ("Get") with a specific resource ("request or response DTO schema definitions") and states the lookup key is the schema name. That is enough to separate it from list_api_modules and search_api, though it never explicitly contrasts itself with get_api_details, which could plausibly return overlapping information.

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 indication of where a valid schemaName comes from (presumably a prior get_api_details call) or what happens when the name is unknown. The phrase "by schema name" only hints at the prerequisite rather than stating it.

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