Get Tool
(v2)GET
Retrieves a tool by id, including its input schema. Pass version to retrieve that version instead of the latest.
curl -X GET "https://api.confident-ai.com/v2/tools/{toolId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"id": "<TOOL-ID>",
"name": "get_customer_name",
"description": "Looks up the customer's name by id.",
"mode": "ALLOW_ADDITIONAL",
"version": "00.00.01",
"schema": {
"type": "object",
"properties": {
"customerId": {
"type": "string",
"description": "The id of the customer to look up."
},
"nameFormat": {
"type": "string",
"enum": [
"FULL",
"FIRST"
],
"description": "Whether to return the full name or only the first name."
}
},
"required": [
"customerId"
]
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
toolIdstringRequiredThe id of the tool.
Query parameters
versionstringThe version to retrieve. Omit it for the latest version.
Response
Get Tool succeeded.
successbooleanIndicates if the request was successful.
dataobjectA tool your prompts can call. Changing its
modeorschemacreates a new version.Show 6 propertiesHide 6 properties
idstringThe id of the tool, generated by Confident AI.
namestringThe name of the tool, unique within the project.
descriptionstring | nullWhat the tool does.
modeenumThis is the mode for your tool input fields, which controls whether fields outside the schema are allowed.
Show 3 enum valuesHide 3 enum values
ALLOW_ADDITIONALNO_ADDITIONALSTRICT
versionstringThe version of the tool. A pulled prompt returns the version its commit pinned.
schemaobjectThe JSON Schema for the tool's input. List each parameter under
propertieswith atype, and name the mandatory ones inrequired. A parameter can also have adescription, anenumof allowed values, oritemsfor an array. Whether extra properties are allowed is set bymode.
deprecatedbooleanIndicates if this endpoint is deprecated.