Create Tool
This endpoint allows you to create a new tool for a specific agent.
Creating a Datastore Tool
For more details, see the Datastore Tool documentation.
When creating a tool of type datastore, you must provide the datastoreId of an existing datastore.
Creating a Delayed Responses Tool
For more details, see the Delayed Responses Tool documentation.
When creating a tool of type delayed_responses, you can optionally provide a config object with a delay property to specify the delay time in seconds. The minimum value is 6 seconds.
Creating a Follow-up Messages Tool
For more details, see the Follow-up Messages Tool documentation.
When creating a tool of type follow_up_messages, you can provide a config object to control the follow-up behavior.
max_sends: The maximum number of follow-up messages to send (integer, 1-10).interval_hours: The interval in hours between each message (integer, 1-96).messages: The content of the follow-up messages. You can define multiple messages by separating them with||.
Creating an HTTP Tool
For more details, see the HTTP Tool documentation.
The http tool is highly versatile, allowing you to make requests to any external API. You can configure headers, query parameters, path variables, and the request body.
type: Must be"http".isRaw: (Optional, default:false) Iftrue, the tool is configured with a raw cURL command.config: An object containing the HTTP request details.name: A friendly name for the tool (e.g., “Search Weather”).description: A clear explanation of what the tool does. This is crucial for the AI to decide when to use it.url: The base URL of the API endpoint.method: The HTTP method (GET,POST,PUT,DELETE,PATCH).withApproval: (Optional) Iftrue, the AI will require human approval before executing the tool.headers: (Optional) An array of objects (key,value) for request headers.queryParameters: (Optional) An array of objects for URL query parameters.pathVariables: (Optional) An array of objects to substitute parts of the URL (e.g.,/users/{userId}).body: (Optional) An array of objects forx-www-form-urlencodedormultipart/form-datarequest bodies.rawBody: (Optional) A string for a raw JSON request body.hasMaximumToolCalls: (Optional, default:false) Iftrue, limits the number of times the tool can be called.maximumToolCalls: (Optional) The maximum number of calls allowed. Defaults to1ifhasMaximumToolCallsistrue.isErrorCountable: (Optional) Iftrue, failed calls count towards the limit. Defaults totrueifhasMaximumToolCallsistrue.
For fields like headers, queryParameters, and pathVariables, you can specify isUserProvided: true to indicate that the AI should ask the end-user for that value.
Example: Changing Conversation Status
This example demonstrates a more advanced POST request. It’s designed to change the status of a conversation by dynamically providing its ID.
pathVariables: Theconversation_idis dynamically inserted into the URL. The AI will use the context variable{conversation-id}to get the correct value.body: The newstatusis sent in the request body. SinceisUserProvidedis true, the AI will determine the appropriate status to send.acceptedValues: This array restricts the AI to only use one of the three specified values for the status (RESOLVED,UNRESOLVED,HUMAN_REQUESTED), ensuring data integrity.
Example: Search Weather
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
http, datastore, mark_as_resolved, request_human, delayed_responses, follow_up_messages Required when type is 'datastore'.
Required when type is 'form'.
Only applicable when type is 'http'. If true, the tool is configured with a raw cURL command.
Configuration object that varies based on the tool 'type'.
Response
http, datastore, mark_as_resolved, request_human, delayed_responses, follow_up_messages Required when type is 'datastore'.
Required when type is 'form'.
Only applicable when type is 'http'. If true, the tool is configured with a raw cURL command.
Configuration object that varies based on the tool 'type'.
Was this page helpful?

