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 with automatic OpenAPI/AsyncAPI format detection. Returns operation status and SwaggerHub URL.

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. On create, fixed values are used: version 1.0.0, private visibility, automock disabled, and no project assignment. On update, the API's existing visibility is preserved.

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. On create, fixed values are used: version 1.0.0, private visibility, automock disabled, and no project assignment. On update, the API's existing visibility is preserved.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
ownerNo
apiNameNo
versionNo
operationNo
Install Server

TDQS

B3.4/5.0
Behavior4/5

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

The description adds meaningful behavioral context beyond the annotations: automatic spec-type detection, unchangeable fixed values on create, HTTP 201/200 responses, the 'operation' response field, and preservation of existing visibility on update. These details give the agent a clear picture of side effects and outcomes.

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 well organized and front-loaded with the core purpose, but it repeats the fixed-value information in both the main paragraph and the 'definition' parameter description. The 'Toolset: Registry API' line adds little, and the redundancy could be trimmed.

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 the 100% parameter coverage, output schema, and annotations, the description covers the essential call semantics, fixed-value constraints, auto-detection, and response behavior. It is complete enough for correct invocation, though it would benefit from explicit update-overwrite semantics and alternative-tool guidance.

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 fully documents the parameters. The description's parameter list largely duplicates the schema rather than adding new semantic meaning, though it does restate the important create/update behavior for the 'definition' parameter.

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 action—'Create a new API or update an existing API in SwaggerHub Registry'—and identifies the resource. It doesn't explicitly differentiate itself from siblings like swagger_patch_api or swagger_create_api_from_prompt, but the primary purpose is unmistakable.

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 guidance on when to use this tool versus alternatives such as swagger_patch_api or swagger_create_api_from_prompt. The description explains behavior but not selection criteria, prerequisites, or situations where another tool would be preferred.

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

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