Glossary · API DOCUMENTATION

operationId

operationId is an OpenAPI field that assigns a unique, stable identifier to a single API operation — one HTTP method on one path. The OpenAPI Specification requires each operationId to be unique across the API, and code generators, SDK builders, and AI agent tooling use it as the canonical name for that operation.

When an agent framework converts an OpenAPI spec into callable tools, operationId typically becomes the function or tool name the model sees. A model chooses which tool to call largely from its name and description, so `createPaymentIntent` gives it far more to work with than a generated fallback like `post_v1_payment_intents` assembled from method and path.

Missing or inconsistent operationIds degrade every downstream artifact at once: generated SDKs get awkward method names, MCP servers built from the spec expose opaque tool names, and an agent selecting among dozens of tools has less signal to pick the right one. Consistent verb-noun naming across operations lets a model generalize — once it has seen `listInvoices` and `getInvoice`, it can predict `createInvoice` exists.

Because operationId is machine-consumed rather than rendered to human readers, it is easy to neglect in specs maintained by hand. Agent integration is the workload that makes it load-bearing.

What does an AI agent make of your API?

Find out in about a minute — no signup.

Discry your API — free