- [Resource: Service](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Service)
  - [JSON representation](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Service.SCHEMA_REPRESENTATION)
- [AgentSpec](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#AgentSpec)
  - [JSON representation](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#AgentSpec.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type)
- [McpServerSpec](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#McpServerSpec)
  - [JSON representation](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#McpServerSpec.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_1)
- [EndpointSpec](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#EndpointSpec)
  - [JSON representation](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#EndpointSpec.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_2)
- [Methods](https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#METHODS_SUMMARY)

## Resource: Service

Represents a user-defined Service.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "interfaces": [ { object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/Interface`) } ], "registryResource": string, "createTime": string, "updateTime": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "agentSpec": { object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#AgentSpec`) }, "mcpServerSpec": { object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#McpServerSpec`) }, "endpointSpec": { object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#EndpointSpec`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the Service. Format: `projects/{project}/locations/{location}/services/{service}`. |
| `displayName` | `string` Optional. User-defined display name for the Service. Can have a maximum length of `63` characters. |
| `description` | `string` Optional. User-defined description of an Service. Can have a maximum length of `2048` characters. |
| `interfaces[]` | ``object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/Interface`)`` Optional. The connection details for the Service. |
| `registryResource` | `string` Output only. The resource name of the resulting Agent, MCP Server, or Endpoint. Format: - `projects/{project}/locations/{location}/mcpServers/{mcpServer}` - `projects/{project}/locations/{location}/agents/{agent}` - `projects/{project}/locations/{location}/endpoints/{endpoint}` |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time. 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. Update time. 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"`. |
| The spec of the service. At least one of the specs must be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `agentSpec` | ``object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#AgentSpec`)`` Optional. The spec of the Agent. When `agentSpec` is set, the type of the service is Agent. |
| `mcpServerSpec` | ``object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#McpServerSpec`)`` Optional. The spec of the MCP Server. When `mcpServerSpec` is set, the type of the service is MCP Server. |
| `endpointSpec` | ``object (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#EndpointSpec`)`` Optional. The spec of the Endpoint. When `endpointSpec` is set, the type of the service is Endpoint. |
| End of mutually exclusive fields. ||

## AgentSpec

The spec of the agent.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type`), "content": { object } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type`)`` Required. The type of the agent spec content. |
| `content` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The content of the Agent spec in the JSON format. This payload is validated against the schema for the specified type. The content size is limited to `10KB`. |

## Type

The type of the agent spec.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Unspecified type. |
| `NO_SPEC` | There is no spec for the Agent. The `content` field must be empty. |
| `A2A_AGENT_CARD` | The content is an A2A Agent Card following the A2A specification. The `interfaces` field must be empty. |

## McpServerSpec

The spec of the MCP Server.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_1`), "content": { object } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_1`)`` Required. The type of the MCP Server spec content. |
| `content` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The content of the MCP Server spec. This payload is validated against the schema for the specified type. The content size is limited to `10KB`. |

## Type

The type of the MCP Server spec. Additional values may be added in the future.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Unspecified type. |
| `NO_SPEC` | There is no spec for the MCP Server. The `content` field must be empty. |
| `TOOL_SPEC` | The content is a MCP Tool Spec following the One MCP specification. The payload is the same as the `tools/list` response. |

## EndpointSpec

The spec of the endpoint.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_2`), "content": { object } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services#Type_2`)`` Required. The type of the endpoint spec content. |
| `content` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The content of the endpoint spec. Reserved for future use. |

## Type

The type of the endpoint spec. Additional values may be added in the future.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Unspecified type. |
| `NO_SPEC` | There is no spec for the Endpoint. The `content` field must be empty. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services/create` | Creates a new Service in a given project and location. |
| ### `https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services/delete` | Deletes a single Service. |
| ### `https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services/get` | Gets details of a single Service. |
| ### `https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services/list` | Lists Services in a given project and location. |
| ### `https://docs.cloud.google.com/agent-registry/reference/rest/v1/projects.locations.services/patch` | Updates the parameters of a single Service. |