Skip to main content

tools

Creates, updates, deletes, gets or lists a tools resource.

Overview

Nametools
TypeResource
Idgoogle.ces.tools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name of the tool. Format: * projects/{project}/locations/{location}/apps/{app}/tools/{tool} for standalone tools. * projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool} for tools retrieved from a toolset. These tools are dynamic and output-only; they cannot be referenced directly where a tool is expected.
agentToolobjectOptional. The agent tool. (id: AgentTool)
clientFunctionobjectOptional. The client function. (id: ClientFunction)
connectorToolobjectOptional. The Integration Connector tool. (id: ConnectorTool)
createTimestring (google-datetime)Output only. Timestamp when the tool was created.
dataStoreToolobjectOptional. The data store tool. (id: DataStoreTool)
displayNamestringOutput only. The display name of the tool, derived based on the tool's type. For example, display name of a ClientFunction is derived from its name property.
etagstringEtag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
executionTypestringOptional. The execution type of the tool. (EXECUTION_TYPE_UNSPECIFIED, SYNCHRONOUS, ASYNCHRONOUS)
fileSearchToolobjectOptional. The file search tool. (id: FileSearchTool)
generatedSummarystringOutput only. If the tool is generated by the LLM assistant, this field contains a descriptive summary of the generation.
googleSearchToolobjectOptional. The google search tool. (id: GoogleSearchTool)
mcpToolobjectOptional. The MCP tool. An MCP tool cannot be created or updated directly and is managed by the MCP toolset. (id: McpTool)
openApiToolobjectOptional. The open API tool. (id: OpenApiTool)
pythonFunctionobjectOptional. The python function tool. (id: PythonFunction)
remoteAgentToolobjectOptional. The remote agent tool. (id: RemoteAgentTool)
systemToolobjectOptional. The system tool. (id: SystemTool)
timeoutstring (google-duration)Optional. The timeout for the tool execution. If not set, the default timeout is 30 seconds for SYNCHRONOUS tools and 60 seconds for ASYNCHRONOUS tools.
toolFakeConfigobjectOptional. Configuration for tool behavior in fake mode. (id: ToolFakeConfig)
updateTimestring (google-datetime)Output only. Timestamp when the tool was last updated.
widgetToolobjectOptional. The widget tool. (id: WidgetTool)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, appsId, toolsIdGets details of the specified tool.
listselectprojectsId, locationsId, appsIdpageSize, pageToken, filter, orderByLists tools in the given app.
createinsertprojectsId, locationsId, appsIdtoolIdCreates a new tool in the given app.
patchupdateprojectsId, locationsId, appsId, toolsIdupdateMaskUpdates the specified tool.
deletedeleteprojectsId, locationsId, appsId, toolsIdforce, etagDeletes the specified tool.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
appsIdstring
locationsIdstring
projectsIdstring
toolsIdstring
etagstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
toolIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of the specified tool.

SELECT
name,
agentTool,
clientFunction,
connectorTool,
createTime,
dataStoreTool,
displayName,
etag,
executionType,
fileSearchTool,
generatedSummary,
googleSearchTool,
mcpTool,
openApiTool,
pythonFunction,
remoteAgentTool,
systemTool,
timeout,
toolFakeConfig,
updateTime,
widgetTool
FROM google.ces.tools
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND appsId = '{{ appsId }}' -- required
AND toolsId = '{{ toolsId }}' -- required
;

INSERT examples

Creates a new tool in the given app.

INSERT INTO google.ces.tools (
data__connectorTool,
data__timeout,
data__name,
data__openApiTool,
data__fileSearchTool,
data__systemTool,
data__widgetTool,
data__pythonFunction,
data__mcpTool,
data__googleSearchTool,
data__clientFunction,
data__remoteAgentTool,
data__dataStoreTool,
data__etag,
data__executionType,
data__agentTool,
data__toolFakeConfig,
projectsId,
locationsId,
appsId,
toolId
)
SELECT
'{{ connectorTool }}',
'{{ timeout }}',
'{{ name }}',
'{{ openApiTool }}',
'{{ fileSearchTool }}',
'{{ systemTool }}',
'{{ widgetTool }}',
'{{ pythonFunction }}',
'{{ mcpTool }}',
'{{ googleSearchTool }}',
'{{ clientFunction }}',
'{{ remoteAgentTool }}',
'{{ dataStoreTool }}',
'{{ etag }}',
'{{ executionType }}',
'{{ agentTool }}',
'{{ toolFakeConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ appsId }}',
'{{ toolId }}'
RETURNING
name,
agentTool,
clientFunction,
connectorTool,
createTime,
dataStoreTool,
displayName,
etag,
executionType,
fileSearchTool,
generatedSummary,
googleSearchTool,
mcpTool,
openApiTool,
pythonFunction,
remoteAgentTool,
systemTool,
timeout,
toolFakeConfig,
updateTime,
widgetTool
;

UPDATE examples

Updates the specified tool.

UPDATE google.ces.tools
SET
data__connectorTool = '{{ connectorTool }}',
data__timeout = '{{ timeout }}',
data__name = '{{ name }}',
data__openApiTool = '{{ openApiTool }}',
data__fileSearchTool = '{{ fileSearchTool }}',
data__systemTool = '{{ systemTool }}',
data__widgetTool = '{{ widgetTool }}',
data__pythonFunction = '{{ pythonFunction }}',
data__mcpTool = '{{ mcpTool }}',
data__googleSearchTool = '{{ googleSearchTool }}',
data__clientFunction = '{{ clientFunction }}',
data__remoteAgentTool = '{{ remoteAgentTool }}',
data__dataStoreTool = '{{ dataStoreTool }}',
data__etag = '{{ etag }}',
data__executionType = '{{ executionType }}',
data__agentTool = '{{ agentTool }}',
data__toolFakeConfig = '{{ toolFakeConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND appsId = '{{ appsId }}' --required
AND toolsId = '{{ toolsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
agentTool,
clientFunction,
connectorTool,
createTime,
dataStoreTool,
displayName,
etag,
executionType,
fileSearchTool,
generatedSummary,
googleSearchTool,
mcpTool,
openApiTool,
pythonFunction,
remoteAgentTool,
systemTool,
timeout,
toolFakeConfig,
updateTime,
widgetTool;

DELETE examples

Deletes the specified tool.

DELETE FROM google.ces.tools
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND appsId = '{{ appsId }}' --required
AND toolsId = '{{ toolsId }}' --required
AND force = '{{ force }}'
AND etag = '{{ etag }}'
;