Method: projects.locations.apps.executeTool

Executes the given tool with the given arguments.

HTTP request

POST https://ces.googleapis.com/v1/{parent=projects/*/locations/*/apps/*}:executeTool

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource name of the app which the tool/toolset belongs to. Format: projects/{project}/locations/{location}/apps/{app}

Request body

The request body contains data with the following structure:

JSON representation
{
  "args": {
    object
  },

  // Union field tool_identifier can be only one of the following:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of list of possible types for union field tool_identifier.
}
Fields
args

object (Struct format)

Optional. The input parameters and values for the tool in JSON object format.

Union field tool_identifier. The identifier of the tool to execute. It could be either a persisted tool or a tool from a toolset. tool_identifier can be only one of the following:
tool

string

Optional. The name of the tool to execute. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

Optional. The toolset tool to execute. Only one tool should match the predicate from the toolset. Otherwise, an error will be returned.

Response body

Response message for ToolService.ExecuteTool.

If successful, the response body contains data with the following structure:

JSON representation
{
  "response": {
    object
  },

  // Union field tool_identifier can be only one of the following:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of list of possible types for union field tool_identifier.
}
Fields
response

object (Struct format)

Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result.

Union field tool_identifier. The identifier of the tool that got executed. tool_identifier can be only one of the following:
tool

string

The name of the tool that got executed. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

The toolset tool that got executed.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • ces.tools.execute

For more information, see the IAM documentation.