---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}:retrieveToolSchema"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}:retrieveToolSchema"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}:retrieveToolSchema

`POST /v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}:retrieveToolSchema`

## Request

- Base URL: `https://ces.googleapis.com`
- URL: `https://ces.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/apps/{appsId}:retrieveToolSchema`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/ces`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/ces`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Retrieve the schema of the given tool. The schema is computed on the fly for the given instance of the tool.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `appsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- RetrieveToolSchemaRequest: Request message for ToolService.RetrieveToolSchema.
  - `tool` string: Optional. The name of the tool to retrieve the schema for. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}
  - `toolsetTool` ToolsetTool: A tool that is created from a toolset.
    - `toolId` string: Optional. The tool ID to filter the tools to retrieve the schema for.
    - `toolset` string: Required. The resource name of the Toolset from which this tool is derived. Format: `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`

## Response `200`

Successful response

- RetrieveToolSchemaResponse: Response message for ToolService.RetrieveToolSchema.
  - `inputSchema` Schema: Represents a select subset of an OpenAPI 3.0 schema object.
    - `additionalProperties` Schema (recursive)
    - `anyOf` Schema[]: Optional. The value should be validated against any (one or more) of the subschemas in the list.
    - `default` unknown
    - `defs` object: Optional. A map of definitions for use by `ref`. Only allowed at the root of the schema.
    - `description` string: Optional. The description of the data.
    - `enum` string[]: Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}
    - `items` Schema (recursive)
    - `maxItems` string, int64: Optional. Maximum number of the elements for Type.ARRAY.
    - `maximum` number, double: Optional. Maximum value for Type.INTEGER and Type.NUMBER.
    - `minItems` string, int64: Optional. Minimum number of the elements for Type.ARRAY.
    - `minimum` number, double: Optional. Minimum value for Type.INTEGER and Type.NUMBER.
    - `nullable` boolean: Optional. Indicates if the value may be null.
    - `prefixItems` Schema[]: Optional. Schemas of initial elements of Type.ARRAY.
    - `properties` object: Optional. Properties of Type.OBJECT.
    - `ref` string: Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root `defs`. For example, the following schema defines a reference to a schema node named "Pet": ``` type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string ``` The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring.
    - `required` string[]: Optional. Required properties of Type.OBJECT.
    - `title` string: Optional. The title of the schema.
    - `type` 'TYPE_UNSPECIFIED' | 'STRING' | 'INTEGER' | 'NUMBER' | 'BOOLEAN' | 'OBJECT' | 'ARRAY': Required. The type of the data.
    - `uniqueItems` boolean: Optional. Indicate the items in the array must be unique. Only applies to TYPE.ARRAY.
  - `outputSchema` Schema: Represents a select subset of an OpenAPI 3.0 schema object.
    - `additionalProperties` Schema (recursive)
    - `anyOf` Schema[]: Optional. The value should be validated against any (one or more) of the subschemas in the list.
    - `default` unknown
    - `defs` object: Optional. A map of definitions for use by `ref`. Only allowed at the root of the schema.
    - `description` string: Optional. The description of the data.
    - `enum` string[]: Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}
    - `items` Schema (recursive)
    - `maxItems` string, int64: Optional. Maximum number of the elements for Type.ARRAY.
    - `maximum` number, double: Optional. Maximum value for Type.INTEGER and Type.NUMBER.
    - `minItems` string, int64: Optional. Minimum number of the elements for Type.ARRAY.
    - `minimum` number, double: Optional. Minimum value for Type.INTEGER and Type.NUMBER.
    - `nullable` boolean: Optional. Indicates if the value may be null.
    - `prefixItems` Schema[]: Optional. Schemas of initial elements of Type.ARRAY.
    - `properties` object: Optional. Properties of Type.OBJECT.
    - `ref` string: Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root `defs`. For example, the following schema defines a reference to a schema node named "Pet": ``` type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string ``` The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring.
    - `required` string[]: Optional. Required properties of Type.OBJECT.
    - `title` string: Optional. The title of the schema.
    - `type` 'TYPE_UNSPECIFIED' | 'STRING' | 'INTEGER' | 'NUMBER' | 'BOOLEAN' | 'OBJECT' | 'ARRAY': Required. The type of the data.
    - `uniqueItems` boolean: Optional. Indicate the items in the array must be unique. Only applies to TYPE.ARRAY.
  - `tool` string: The name of the tool that the schema is for. Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`
  - `toolsetTool` ToolsetTool: A tool that is created from a toolset.
    - `toolId` string: Optional. The tool ID to filter the tools to retrieve the schema for.
    - `toolset` string: Required. The resource name of the Toolset from which this tool is derived. Format: `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`

## Changes

- **2026-11-17** `455f2f484021`: 4 info
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-11** `d1599b011b2e`: 4 info
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/ces` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/ces/changes/v1/projects/:projectsId/locations/:locationsId/apps/:appsId:retrieveToolSchema/post.md)

---

[API](https://skmtc.dev/google/apis/ces.md) - [All operations](https://skmtc.dev/google/apis/ces/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/ces/revisions/455f2f484021?raw)
