Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Swagger: Get API Definition

swagger_get_api_definition
Read-onlyIdempotent

Fetch a resolved or flattened OpenAPI definition from SwaggerHub Registry by providing owner, API name, and version.

Instructions

Fetch resolved API definition from SwaggerHub Registry based on owner, API name, and version.

Toolset: Registry API

Parameters:

  • owner (string) required: API owner (organization or user, case-sensitive)

  • api (string) required: API name (case-sensitive)

  • version (string) required: Version identifier

  • resolved (boolean): Set to true to get the resolved version with all external $refs included (default false)

  • flatten (boolean): Set to true to create models from inline schemas in OpenAPI definition (default false)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiYesAPI name (case-sensitive)
ownerYesAPI owner (organization or user, case-sensitive)
flattenNoSet to true to create models from inline schemas in OpenAPI definition (default false)
versionYesVersion identifier
resolvedNoSet to true to get the resolved version with all external $refs included (default false)
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description does not need to reiterate safety. It adds value by explaining the 'resolved' and 'flatten' parameters, but does not mention authentication, rate limits, or error handling.

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 extremely concise: one sentence for purpose, one line for toolset, then a bullet list of parameters. It is front-loaded and contains no unnecessary information.

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

Completeness3/5

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

The description lacks information about the return value format (e.g., JSON/YAML) and does not handle error cases (e.g., not found). Given no output schema, this omission reduces completeness.

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?

With 100% schema description coverage, the description does not add significant meaning beyond the schema. It lists parameters with defaults, but provides no extra context about their impact on the output.

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 clearly states it fetches a resolved API definition from SwaggerHub Registry with required parameters. However, it does not explicitly differentiate from sibling tools like swagger_search_apis_and_domains or swagger_get_document, which could cause confusion.

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?

No guidance is provided on when to use this tool versus other swagger tools. The 'Toolset: Registry API' line is vague and does not help the agent decide between this and similar operations.

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/SmartBear/smartbear-mcp'

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