Skip to main content
Glama

TestingAPIs API tools

Convert an API description

convert_api_spec
Read-onlyIdempotent

Convert between API description formats: OpenAPI 3, Swagger 2.0, a Postman collection, cURL commands or a HAR recording in; OpenAPI 3.1 (JSON or YAML), Swagger 2.0, a Postman collection v2.1, cURL commands or an .http file out. Anything the target format can't hold is listed.

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": {
      "source": "<source>",
      "to": "<to>"
    },
    "name": "convert_api_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
sourceYesThe API description: OpenAPI or Swagger (JSON or YAML), a Postman collection, cURL commands or a HAR file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds a genuinely useful behavioral trait beyond that: conversion is lossy and 'anything the target format can't hold is listed,' warning the agent that data may be dropped. It doesn't say where or how that list is surfaced, which keeps it from a 5.

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 a single dense sentence with zero filler, front-loaded with the action and neatly split into 'in' and 'out' clauses. It is efficient, though the packed format list takes a careful read to parse.

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?

With two simple parameters and full annotations, most of the burden is met, and the lossy-conversion note covers an important edge case. However, there is no output schema, and the description never states what the tool actually returns (converted text plus the list of unsupported features), leaving the result shape to inference.

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 only 50% and the 'to' enum carries no description, so the description must compensate. It does: it maps accepted source formats (OpenAPI, Swagger, Postman, cURL, HAR) and target values (openapi-json/yaml, swagger-json, postman, curl, http), clarifying that HAR is input-only and that 'to' selects the output format.

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 opens with a specific verb and resource ('Convert between API description formats') and then enumerates exactly which formats are accepted on input versus produced on output. That enumeration makes it clearly distinct from siblings such as validate_openapi or curl_to_code, which share vocabulary but do different things.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The in/out format lists effectively tell an agent when this tool is the right choice: any time a spec, Postman collection, cURL command, or HAR needs to become another format. There is no explicit statement of when NOT to use it or a named alternative for overlapping needs (e.g., validate_openapi), so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources