NEWSRelevance Lab makes a strategic majority investment in kaman.aiLearn more

kaman.ai

IntegrationsPricingTemplatesBlogPapersDocs

Documentation

Guides, use cases & API reference

  • Overview
    • Getting Started
    • Platform Overview
  • Features
    • Features Overview
    • AI Assistant
    • Workflow Automation
    • Intelligent Memory
    • Data Management
    • Universal Integrations
    • Communication Channels
    • Collective Agent Memory (CAML)
    • Security & Control
  • Use Cases Overview
  • Financial Services
  • Fraud Detection
  • Supply Chain
  • Technical Support
  • Software Development
  • Smart ETL
  • Data Governance
  • ESG Reporting
  • TAC Management
  • Reference
    • API Reference
  • Guides
    • Getting Started
    • Authentication
  • Endpoints
    • Workflows API
    • Tools API
    • KDL (Data Lake) API
    • OpenAI-Compatible API
    • A2A Protocol
    • Skills API
    • Knowledge Base (RAG) API
    • Communication Channels
    • DSL Import API
Release Notes

Tools

Tools are functions that agents can call to perform specific actions — like fetching data from an API, querying a database, sending a message, or processing information. Each tool is defined with inputs, outputs, and execution code.


Creating a Tool

Click the + Create button to define a new tool. Each tool needs:

  • Name — a short camelCase verb (e.g., getWeather, sendEmail)
  • Description — what the tool does and what it returns. The LLM reads this to decide when to use the tool
  • Input fields — parameters the LLM provides at runtime (e.g., city, query, message)
  • User fields — credentials and config the user stores once (e.g., API keys, tokens)
  • Output fields — what the tool returns (for documentation)
  • Call code — the JavaScript that executes when the tool is invoked

Input Fields vs User Fields

Field TypeWho ProvidesUse ForExamples
Input fieldsLLM at runtimeDynamic data per callcity, query, message, itemId
User fieldsUser stores onceCredentials and configapiKey, username, password, token
Output fieldsTool returnsDocumentation onlytemperature, results, success

Important: Never add API keys or passwords as input fields. The LLM sees input fields but never sees user fields. Use user fields for all secrets and credentials.

Writing Call Code

The code editor gives you access to:

VariableDescription
dataAll inputs merged (inputFields + userFields)
axiosHTTP client for making API requests
_Lodash utility library
cryptoNode.js crypto module
fFunction config (f.url, f.name)
configCredentials from the auth service

Example

javascript
// A simple tool that fetches weather data
const city = data.city;
const apiKey = data.apiKey; // from userFields

const response = await axios.get(
  `https://api.weather.com/v1/current?city=${city}&key=${apiKey}`
);

return {
  temperature: response.data.temp,
  condition: response.data.condition
};

Quick Tips

  • Write descriptive tool descriptions — the LLM uses them to decide when to invoke the tool
  • Use user fields for API keys and secrets, never input fields
  • Keep call code focused — one tool, one action
  • Test your tool with sample inputs before attaching it to an agent
  • Mark fields as required when the tool can't function without them

On this page

  • Creating a Tool
  • Input Fields vs User Fields
  • Writing Call Code
  • Example
  • Quick Tips