Tools Overview
Tools give BindAI applications a way to expose executable capabilities to agents and workflows. A tool can wrap application logic such as:- Calculations
- Data processing
- API calls
- Business logic
- Project-specific operations
- External integrations
Tool objects and can be registered in a ToolRegistry. Project tools can then be discovered by the Studio runtime and used by workflow Tool nodes.
What Is a Tool?
A BindAI tool represents an executable operation. The simplest way to create a project tool is with the@tool decorator:
Creating Tools
Project tools are normally stored in the project’stools directory.
For example:
Tool Definitions
BindAI tools expose a structured definition describing the operation. The tool definition contains information such as:- Tool name
- Description
- Parameters
payload object parameter.
A tool definition allows the runtime to understand the interface of the operation without executing it.
Tool Parameters
Tool parameters represent the inputs required by an operation. For example:value input.
Use clear parameter names and Python type annotations:
Tool Execution
A tool is executed with a BindAI execution context. The tool system provides the current variables and execution information through that context. Tool implementations can therefore access values supplied by the surrounding execution rather than requiring every value to be passed through a separate global mechanism. For example, aTool implementation can read a variable from the execution context:
Tool Results
Tool execution produces aToolResult.
A successful result can contain the operation’s output:
Tool Errors
Tools can fail during execution. A tool can report a failure throughToolResult:
ToolRegistry
BindAI provides aToolRegistry for registering and resolving tools.
The registry allows the runtime to look up a tool by name.
This is important for workflow definitions because a persisted Tool node stores the tool name rather than serializing the Python callable itself.
At runtime, the workflow loader resolves that name through the registry.
Conceptually:
Project Tool Discovery
BindAI Studio can discover tools from a project’s tool modules. For example:ToolRegistry.
The Studio API also exposes the project’s discovered tools.
This allows the visual workflow editor to use project tools without embedding Python callable objects inside the workflow definition.
Tools in Workflows
Tools are directly supported by BindAI workflows. A workflow can contain a Tool node that executes a registered tool. For example:Tool Parameter Mapping
Workflow Tool nodes support parameter mapping. For example:Agent and Tool Workflows
Tools can be combined with Agent nodes. For example:Connection-Backed Tools
BindAI V1 also supports tools backed by configured connections. The architecture is:payload and sends it through the configured Webhook connection.
This allows a workflow to interact with an external HTTP endpoint without embedding the connection details directly in the workflow definition.
Webhook Tool Example
A Webhook connection-backed tool exposes a payload parameter:Tools and Memory
Tools and Memory solve different problems. Memory provides stored execution or conversation context. Tools provide executable operations. They can therefore be used together in an agent or workflow:Tools and Knowledge
Tools can also be used alongside BindAI Knowledge. Knowledge provides access to configured project knowledge during agent execution. Tools provide executable operations. For example:Tools and Conditions
Tools can participate in workflow control flow. For example:Tools and Loops
A Tool node can also be part of a loop. For example:Tools and Parallel Execution
Tools can participate in parallel workflow branches. For example:Tool Reuse
Project tools can be reused by multiple workflows. For example:- Common data transformations
- API operations
- Business logic
- Project utilities
- External integration operations
Tools and Studio
BindAI Studio exposes project tools to the visual workflow editor. The Studio API provides the project’s discovered tools so the editor can present available operations when configuring a Tool node. The workflow stores the tool name and configuration. At runtime, the project tool registry resolves the name to the actual tool implementation. This separates the visual workflow definition from the Python implementation.Tool Security
Tools can execute real application logic and external operations. Applications should therefore treat tools as application boundaries. Important practices include:- Validate external input.
- Do not expose credentials to the model.
- Do not return secrets through tool results.
- Keep destructive operations narrowly scoped.
- Apply authorization in application code.
- Validate important data before writing to external systems.
- Avoid unnecessary side effects.
Testing Tools
Tools should be tested independently where possible. For example, a normal Python function can be tested directly:- Tool registration
- Tool discovery
- Parameter mapping
- Successful execution
- Failed execution
- Tool results
- Agent-to-tool workflows
- Connection-backed tools where applicable
Current V1 Tool Scope
The current BindAI V1 tool system includes:- Python project tools
- The
@tooldecorator ToolimplementationsToolDefinitionToolResultToolRegistry- Project tool discovery
- Workflow Tool nodes
- Tool parameter mapping
- Agent-to-Tool workflow execution
- Connection-backed Webhook tools
- Studio tool discovery
- MCP tool management
- A general marketplace of external tools
- Provider-specific tool management UI
- Automatic discovery of arbitrary external services
Summary
Tools provide BindAI with executable application capabilities. The basic project-tool pattern is:ToolRegistry.
Workflow definitions can then reference the tool by name:
