- [Resource: ApiOperation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation.SCHEMA_REPRESENTATION)
- [OperationDetails](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationDetails)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationDetails.SCHEMA_REPRESENTATION)
- [McpTool](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#McpTool)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#McpTool.SCHEMA_REPRESENTATION)
- [ToolAnnotations](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ToolAnnotations)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ToolAnnotations.SCHEMA_REPRESENTATION)
- [OperationSchema](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#METHODS_SUMMARY)

## Resource: ApiOperation

Represents an operation contained in an API version in the API Hub. An operation is added/updated/deleted in an API version when a new spec is added or an existing spec is updated/deleted in a version. Currently, an operation will be created only corresponding to OpenAPI spec as parsing is supported for OpenAPI spec. Alternatively operations can be managed via create,update and delete APIs, creation of apiOperation can be possible only for version with no parsed operations and update/delete can be possible only for operations created via create API.

| JSON representation |
|---|
| ``` { "name": string, "spec": string, "details": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationDetails`) }, "createTime": string, "updateTime": string, "attributes": { string: { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, ... }, "sourceMetadata": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`) } ], "deployments": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The name of the operation. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` |
| `spec` | `string` Output only. The name of the spec will be of the format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` Note:The name of the spec will be empty if the operation is created via `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/create#google.cloud.apihub.v1.ApiHub.CreateApiOperation` API. |
| `details` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationDetails`)`` Optional. Operation details. Note: Even though this field is optional, it is required for `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/create#google.cloud.apihub.v1.ApiHub.CreateApiOperation` API and we will fail the request if not provided. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the operation was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the operation was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `attributes` | ``map (key: string, value: object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`))`` Optional. The list of user defined attributes associated with the API operation resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `sourceMetadata[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`)`` Output only. The list of sources and metadata from the sources of the API operation. |
| `deployments[]` | `string` Optional. The deployments linked directly to this API operation. For operations parsed from a spec, `operations.patch` returns `FAILED_PRECONDITION`; link the parent spec to the deployment via `Spec.deployments` instead. Format is `projects/{project}/locations/{location}/deployments/{deployment}` |

## OperationDetails

The operation details parsed from the spec.

| JSON representation |
|---|
| ``` { "description": string, "documentation": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`) }, "deprecated": boolean, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "httpOperation": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/HttpOperation`) }, "mcpTool": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#McpTool`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `description` | `string` Optional. Description of the operation behavior. For OpenAPI spec, this will map to `operation.description` in the spec, in case description is empty, `operation.summary` will be used. |
| `documentation` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`)`` Optional. Additional external documentation for this operation. For OpenAPI spec, this will map to `operation.documentation` in the spec. |
| `deprecated` | `boolean` Optional. For OpenAPI spec, this will be set if `operation.deprecated`is marked as `true` in the spec. |
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `httpOperation` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/HttpOperation`)`` The HTTP Operation. |
| `mcpTool` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#McpTool`)`` The MCP Tool Operation. |
| End of mutually exclusive fields. ||

## McpTool

Details describing an MCP Tool.

| JSON representation |
|---|
| ``` { "name": string, "title": string, "description": string, "annotations": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ToolAnnotations`) }, "inputSchema": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema`) }, "outputSchema": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The name of the tool, unique within its parent scope (version). |
| `title` | `string` Optional. Optional title for the tool. |
| `description` | `string` Optional. Description of what the tool does. |
| `annotations` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ToolAnnotations`)`` Optional. Optional annotations for the tool. |
| `inputSchema` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema`)`` Optional. Input schema for the operation. This can be parsed only from MCP schema type. |
| `outputSchema` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#OperationSchema`)`` Optional. Output schema for the operation. This can be parsed only from MCP schema type. |

## ToolAnnotations

Annotations for a Tool.

| JSON representation |
|---|
| ``` { "title": string, "additionalHints": { string: string, ... }, "readOnlyHint": boolean, "destructiveHint": boolean, "idempotentHint": boolean, "openWorldHint": boolean } ``` |

| Fields ||
|---|---|
| `title` | `string` Optional. A human-readable title for the tool (if different from Tool.title). |
| `additionalHints` | `map (key: string, value: string)` Optional. Additional hints which may help tools and not covered in defaults. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `readOnlyHint` | `boolean` Optional. Hint indicating if the tool is read-only. |
| `destructiveHint` | `boolean` Optional. Hint indicating if the tool may have destructive side effects. |
| `idempotentHint` | `boolean` Optional. Hint indicating if the tool is idempotent. |
| `openWorldHint` | `boolean` Optional. Hint indicating if the tool interacts with the open world (e.g., internet). |

## OperationSchema

The operation schema needed for an operation.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "jsonSchema": { object } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The value of the schema. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `jsonSchema` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` The JSON schema. Only valid JSON is accepted but semantic validation of schema is not supported right now. |
| End of mutually exclusive fields. ||

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/create` | Create an apiOperation in an API version. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/delete` | Delete an operation in an API version and we can delete only the operations created via create API. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/get` | Get details about a particular operation in API version. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/list` | List operations in an API version. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch` | Update an operation in an API version. |