Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Swagger: Create or Update API

swagger_create_or_update_api
DestructiveIdempotent

Create or update an API in SwaggerHub Registry by providing the owner, API name, and definition content. Automatically detects OpenAPI or AsyncAPI specification and applies default settings.

Instructions

Create a new API or update an existing API in SwaggerHub Registry for Swagger Studio. The API specification type (OpenAPI, AsyncAPI) is automatically detected from the definition content. APIs are always created with fixed values: version 1.0.0, private visibility, and automock disabled (these values cannot be changed). Returns HTTP 201 for creation, HTTP 200 for update. Response includes 'operation' field indicating whether it was a 'create' or 'update' operation along with API details and SwaggerHub URL.

Toolset: Registry API

Parameters:

  • owner (string) required: Organization name (owner of the API)

  • apiName (string) required: API name

  • definition (string) required: API definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. API is created with fixed values: version 1.0.0, private visibility, automock disabled, and no project assignment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesOrganization name (owner of the API)
apiNameYesAPI name
definitionYesAPI definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. API is created with fixed values: version 1.0.0, private visibility, automock disabled, and no project assignment.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
ownerNo
apiNameNo
versionNo
operationNo
Behavior4/5

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

Annotations already indicate read/write and idempotency. The description adds valuable context about fixed values (version, visibility, automock), auto-detection of spec type, and HTTP response codes. No contradiction with annotations.

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 description is concise, with a clear purpose statement and separate parameter listing. It is front-loaded but slightly verbose in repeating fixed values. Generally efficient and well-structured.

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?

Given good schema coverage, annotations, and an output schema, the description adequately covers key behavioral and response details. It lacks usage guidance relative to siblings, but overall is complete for the tool's complexity.

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?

Input schema covers all parameters with descriptions (100% coverage). The description restates some schema info but adds little new semantic value. Baseline 3 is appropriate.

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 the tool creates or updates an API in SwaggerHub Registry. It uses specific verbs and identifies the resource. However, it does not distinguish from the sibling tool 'swagger_create_api_from_prompt', which also creates APIs, slightly reducing clarity.

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 implies usage by stating 'create or update' and noting fixed values, but it does not explicitly advise when to use this tool versus alternatives like the similar sibling. No when-not-to-use guidance or prerequisites are provided.

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