For AI agents: the complete documentation index is at https://docs.routebase.dev/llms.txt. Every page is also available as Markdown by appending index.md to its URL or by sending Accept: text/markdown.

Connect your agent

Your AI agent can search and read these docs over MCP. The endpoint is read-only and needs no key.

MCP endpoint

https://docs.routebase.dev/mcp

Claude Code Run in a terminal

claude mcp add --transport http routebase-documentation https://docs.routebase.dev/mcp

Cursor Add to .cursor/mcp.json

{
  "mcpServers": {
    "routebase-documentation": {
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

VS Code Add to .vscode/mcp.json

{
  "servers": {
    "routebase-documentation": {
      "type": "http",
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

Codex Add to ~/.codex/config.toml

[mcp_servers.routebase-documentation]
url = "https://docs.routebase.dev/mcp"
MCP Reference

API Specifications — MCP Tools

Create, read, update and delete API specifications. This page documents the API Specifications group of the Routebase MCP server, with the scope and the parameters of each tool.

The group is part of the core set, so every session advertises it from the start.

create_spec

Create a new API specification in the active project. Returns the id of the automatically created initial draft version — use it as versionId when creating endpoints. Use this for a new empty spec; to bring an existing OpenAPI document into the project use import_spec. Requires project context.

Required scope: specs:write

Parameter Type Required Description
name string Yes Name of the API specification
version string Yes Version string (e.g., '1.0.0')
openApiVersion string No (default "v3_2") OpenAPI version: 'v3_0', 'v3_1' or 'v3_2' (default 'v3_2')
description string No Optional description of the API

delete_spec

Delete an API specification and everything under it — versions, endpoints, schemas, folders and tags. Use this to remove the whole spec; to drop a single version only use delete_version. Requires project context.

Required scope: specs:delete

Parameter Type Required Description
specId string Yes Public ID (GUID) of the API specification to delete

export_spec

Export an API specification as OpenAPI YAML, JSON, or Postman Collection. Use this to get the finished document out; to check it against the standard first use validate_spec. Requires project context.

Required scope: specs:read

Parameter Type Required Description
specId string Yes Public ID (GUID) of the API specification to export
format string No (default "yaml") Export format: 'yaml' (default), 'json', or 'postman'

get_spec

Get detailed information about an API specification, including whether its documentation is internal, authenticated or public and under which slug. Includes the spec's versions (newest first, up to 10) — use their id as versionId for create_endpoint and other version-scoped tools. Use this when you already have the spec id; to browse the project's specs or find an id use list_specs. Requires project context.

Required scope: specs:read

Parameter Type Required Description
specId string Yes Public ID (GUID) of the API specification

import_spec

Import an OpenAPI specification from YAML or JSON content into the active project. Use this to bring an existing OpenAPI document in; to start from an empty spec use create_spec. targetSpecId imports into that empty spec, which keeps its name and version. Requires project context.

Required scope: specs:write

Parameter Type Required Description
content string Yes The OpenAPI specification content (YAML or JSON string)
format string No Format hint: 'yaml', 'json', or omit for auto-detection
validateOnly boolean No (default false) If true, only validate without importing (default false)
convertToOpenApi31 boolean No (default false) Convert OpenAPI 3.0 to 3.1 during import (default false)
createFoldersFromTags boolean No (default false) Create folders from OpenAPI tags (default false)
shortenSchemaNames boolean No (default false) Shorten schema names to the last dot-segment when unique within the spec (default false)
discardOriginalSchemaNames boolean No (default false) With shortenSchemaNames: permanently discard the cut namespace segments — original names are not stored; re-imports/diffs against the source file will report renames (default false)
targetSpecId string No Empty spec to import into (UUID)

list_specs

List all API specifications in the active project. Set scope to 'org' to list the published APIs across every project in the organization instead — each entry carries the projectId and specId to pass to set_context. Use this to browse specs or find a spec id; for one spec by id use get_spec. Requires project context for scope 'project'.

Required scope: specs:read

Parameter Type Required Description
skip integer No (default 0) Number of specs to skip (for pagination, default 0)
take integer No (default 50) Number of specs to return (default 50, max 100)
scope string No (default "project") What to list: 'project' (default) or 'org'

push_spec

Write an OpenAPI file into the draft of an existing spec. Endpoints match by method and path, schemas and components by name, and update in place, so linked tests and mock rules stay linked. What the file lacks is removed. Preview with validate_spec mode 'push'. Edits made in Routebase since the last push fail with SPEC_PUSH_CONFLICT and details.conflicts, so ask the user before retrying with overwrite. A first push into an empty draft also sets up mock and smoke tests. Requires project context.

Required scope: specs:write, specs:delete

Parameter Type Required Description
specId string Yes Public ID (GUID) of the API specification
content string Yes The OpenAPI document (YAML or JSON string)
format string No Format hint: 'yaml', 'json', or omit for auto-detection
versionId string No Draft version (UUID), omit for the single draft
overwrite boolean No (default false) Let the file win over edits made in Routebase (default false)
createFoldersFromTags boolean No (default false) Put new endpoints into folders named after their first tag (default false)

update_spec

Update an API specification's metadata: name, version string, description, base path or server URL. Omit a field to keep its current value; pass an empty string to clear description, basePath or serverUrl (name and version cannot be empty). Get the spec's rowVersion from get_spec. Requires project context.

Required scope: specs:write

Parameter Type Required Description
specId string Yes Public ID (GUID) of the API specification
rowVersion string Yes Base64-encoded row version of the spec (for concurrency control), from get_spec
name string No New name, or omit to keep the current name
version string No New version string (e.g. '2.0.0'), or omit to keep the current one
description string No New description; empty string clears it, omit to keep the current one
basePath string No New base path (e.g. '/v2'); empty string clears it, omit to keep the current one
serverUrl string No New server URL (absolute HTTPS); empty clears, omit keeps
selfUri string No 3.2 only: document $self URI; omit keeps, empty string clears
contactEmail string No Contact email (info.contact); empty clears, omit keeps
license string No License name (info.license), e.g. 'MIT'; empty clears, omit keeps

validate_spec

Validate an OpenAPI specification against the standard. Provide either content to validate directly, or specId to validate an existing spec. Set mode to 'import' for a dry run of import_spec instead: same errors and warnings, plus what would be created (endpoint, schema and folder counts), the detected format and whether a 3.0 → 3.1 conversion happened. Mode 'push' with specId and content is the dry run of push_spec. Nothing is written either way.

Required scope: specs:read

Parameter Type Required Description
content string No The OpenAPI specification content to validate (YAML or JSON). Provide either content or specId, not both.
specId string No Public ID (GUID) of an existing spec to validate. If provided, the spec is exported first and then validated.
format string No Format hint: 'yaml', 'json', or omit for auto-detection
mode string No (default "openapi") What to check: 'openapi' (default), 'import' or 'push'
convertToOpenApi31 boolean No (default false) For mode 'import': convert a 3.0 document to 3.1 (default false)
shortenSchemaNames boolean No (default false) For mode 'import': shorten generated schema names (default false)
versionId string No For mode 'push': draft version (UUID), omit for the single draft