Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Swagger: Get API Definition

swagger_get_api_definition
Read-onlyIdempotent

Retrieve a resolved API definition from SwaggerHub Registry using owner, API name, and version. Optionally resolve external references or flatten inline schemas.

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)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
definitionYes
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds behavioral context beyond annotations by explaining the resolved and flatten parameters, which affect the output. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with a clear opening line and parameter list, but it repeats information already in the schema (e.g., parameter names and descriptions). Could be more concise without sacrificing clarity.

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?

With annotations covering safety and an output schema present, the description covers the core functionality and parameter details adequately. The lack of return value explanation is mitigated by the output schema. Minor gaps like error handling are absent.

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 100%, but the description adds value by noting case-sensitivity for owner and api, and default values for resolved and flatten. This clarifies usage beyond the schema's property descriptions.

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 clearly states the action ('Fetch') and the resource ('resolved API definition from SwaggerHub Registry'). It distinguishes itself from sibling tools like swagger_get_document or swagger_search_apis_and_domains by specifically targeting the API definition retrieval from the registry.

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?

The description explains what the tool does but provides no guidance on when to use this tool versus other swagger tools (e.g., swagger_get_document). No explicit when-to-use, when-not-to-use, or alternative suggestions are given.

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