Home / Directory / OpenAI Developer Docs / get_openapi_spec

Get openapi spec

An MCP tool from the OpenAI Developer Docs server, run by OpenAI.

Return the OpenAPI spec for a specific API endpoint URL. Optionally filter code samples by language, or return only code samples.

Name on the gateway: openai_docs__get_openapi_spec.

Parameters

NameTypeDescription
url requiredstring
languagesarray
codeExamplesOnlyboolean

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_docs__get_openapi_spec",
  "arguments": {
    "url": "…"
  }
}

The first call connects OpenAI Developer Docs to your account automatically; nothing to set up. About this server.

Try asking

Use the get openapi spec tool with url set to ….

More from OpenAI Developer Docs