Configuring the tool
When you add the Call Function tool to your agent in the Agent builder, you must complete the following fields:- Tool name: A name that identifies the tool’s purpose.
- Tool instructions: Instructions that tell the agent when and how to use this tool.
- Function name: The deployed Cognite function that the agent calls.
- Max polling time in seconds: The maximum time the agent waits for the function to complete. The default is 540 seconds.
- Schema: A JSON Schema that defines the structure of arguments that the agent passes to the function.
Each Call Function tool instance calls one function. To call multiple functions, add a separate Call Function tool to your agent for each function.
Defining the schema
The schema defines the arguments the function accepts. Your agent validates arguments against the schema before it calls the function.Schema structure
The following table describes the JSON schema keywords that you can use to define function arguments.| Keyword | Description | Required |
|---|---|---|
type | Data type of the root object. Set to "object" | Yes |
properties | Object defining each parameter, including its type and description | Yes |
required | Array of property names that must be provided | No |
description | Human-readable text that helps the agent understand the parameter | No |
Schema example
The following schema defines arguments for a function that retrieves Cognite Data Fusion (CDF) spaces. Theitems property accepts an array of objects that each contain a space identifier: