Skip to main content

tools

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

Overview

Nametools
TypeResource
Idgoogle.dialogflow.tools

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the Tool. Format: projects//locations//agents//tools/.
dataStoreSpecobjectData store search tool specification. (id: GoogleCloudDialogflowCxV3ToolDataStoreTool)
descriptionstringRequired. High level description of the Tool and its usage.
displayNamestringRequired. The human-readable name of the Tool, unique within an agent.
functionSpecobjectClient side executed function specification. (id: GoogleCloudDialogflowCxV3ToolFunctionTool)
openApiSpecobjectOpenAPI specification of the Tool. (id: GoogleCloudDialogflowCxV3ToolOpenApiTool)
toolTypestringOutput only. The tool type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_tools_getselectprojectsId, locationsId, agentsId, toolsIdRetrieves the specified Tool.
projects_locations_agents_tools_listselectprojectsId, locationsId, agentsIdpageSize, pageTokenReturns a list of Tools in the specified agent.
projects_locations_agents_tools_createinsertprojectsId, locationsId, agentsIdCreates a Tool in the specified agent.
projects_locations_agents_tools_patchupdateprojectsId, locationsId, agentsId, toolsIdupdateMaskUpdate the specified Tool.
projects_locations_agents_tools_deletedeleteprojectsId, locationsId, agentsId, toolsIdforceDeletes a 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
agentsIdstring
locationsIdstring
projectsIdstring
toolsIdstring
forceboolean
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified Tool.

SELECT
name,
dataStoreSpec,
description,
displayName,
functionSpec,
openApiSpec,
toolType
FROM google.dialogflow.tools
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND toolsId = '{{ toolsId }}' -- required;

INSERT examples

Creates a Tool in the specified agent.

INSERT INTO google.dialogflow.tools (
data__name,
data__displayName,
data__description,
data__openApiSpec,
data__dataStoreSpec,
data__functionSpec,
projectsId,
locationsId,
agentsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ openApiSpec }}',
'{{ dataStoreSpec }}',
'{{ functionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}'
RETURNING
name,
dataStoreSpec,
description,
displayName,
functionSpec,
openApiSpec,
toolType
;

UPDATE examples

Update the specified Tool.

UPDATE google.dialogflow.tools
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__openApiSpec = '{{ openApiSpec }}',
data__dataStoreSpec = '{{ dataStoreSpec }}',
data__functionSpec = '{{ functionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND toolsId = '{{ toolsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
dataStoreSpec,
description,
displayName,
functionSpec,
openApiSpec,
toolType;

DELETE examples

Deletes a specified Tool.

DELETE FROM google.dialogflow.tools
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND toolsId = '{{ toolsId }}' --required
AND force = '{{ force }}';