Skip to main content
Version: v5.2

Tools overview

Overview​

An AI tool is a functional AI component used by agents to retrieve or transform data.

A tool has the following characteristics:

  • Acts as a utility which helps agents perform specific tasks such as fetching data from platform services
  • Enables RAG​
  • Is configured with clear usage instructions and input parameters

To equip an agent with a tool, simply add the tool to the agent's _tools array.

System tools​

The following system tools are available:

  • Platform API Tools: Tools that expose the Read API calls from platform API
  • Query tools: Generate queries for collections and their related items in the Item Service based on schemas defined in the namespace and user input

Custom MCP tools​

To add your own tool logic, create a custom MCP tool. For more information, see Custom MCP Tools.

Schemas and SchemaDefinitions​

Schemas provide crucial context for the AI Service to generate more accurate and relevant Item Service queries for your tools.​ For more information, see Schemas.

Equipping an Agent with a tool​

To equip an agent with a tool, do the following:

  1. Create an agent. See the code example below for details.
  2. List the tool you want in the _tools array.
const queryAgent = IafAISvc.createAgents([{
_name: "Graph Query Agent",
_background: "Uses the GetSchemaDefinitionsTool to get the schema, then pass the prompt and schema to GraphQueryTool tool and return the output of GraphQueryTool",
_userType: "graph_query_agent_1",
_type: "user_agent",
_namespaces: [
"workspace_m8NrvPU3"
],
_config: {
_model: "gpt-4o",
_provider: "openai"
},
_tools: [
"GetSchemaDefinitionsTool",
"GraphQueryTool"
]
}]);