convert_legacy_to_canonical
Convert Postman, OpenAPI/Swagger, or Insomnia exports into YAML under .mcp/api, while moving credentials to .env.mcp.local and replacing them with {{VARIABLE}}.
Instructions
Turn a Postman collection, an OpenAPI/Swagger spec or an Insomnia export into a YAML definition under .mcp/api/. Give legacyRelativePath for a file in the workspace, or legacyContent with the JSON/YAML text the user pasted. Literal credentials found in headers or auth are moved to .env.mcp.local and replaced by {{VARIABLE}}. Refuses to replace an existing file unless overwrite is true. Apidog: export as OpenAPI or Postman first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overwrite | No | Replace outputRelativePath if it already exists. | |
| serviceName | No | ||
| legacyContent | No | The collection / spec itself (JSON or YAML text), when the user pasted it instead of pointing at a file. Provide this or legacyRelativePath. | |
| workspaceRoot | No | Absolute project path (optional when MCP_WORKSPACE_ROOT is set). | |
| legacyRelativePath | No | Path to a Postman / OpenAPI / Insomnia file in the workspace. | |
| outputRelativePath | No | Where to write, under .mcp/api/. Defaults to .mcp/api/imported.yaml |