Tools
Tools let agents go beyond answering questions.
What Are Tools?
A tool is a reusable operation that an agent can invoke during a conversation. Each tool defines what inputs it needs and what it returns, so the agent can run it safely and use the results in its response.
Instead of only retrieving information, agents with tools can take action, including execute code, query data, browse websites, generate files, or interact with external systems through MCP.
Tool Sources
Chocolate Factory supports several types of tools:
| Source | Description |
|---|---|
| Built-in tools | Native capabilities built into the platform, such as chart rendering, code execution, web browsing, and document generation. See Built-in Tools. |
| MCP servers | Tools exposed through the Model Context Protocol (MCP) . Connect pre-built connectors or custom MCP servers to call external APIs and services. See MCP Server. |
| Custom MCP | Register your own MCP server URL to integrate proprietary or third-party services not covered by a template. |
| Database connectors | Connect structured data sources so agents can run queries and explain results. Supports Postgres, MySQL, SQL Server, MongoDB, and more. See Database. |
| Knowledge bases | Upload and index documents for retrieval-augmented generation (RAG). Agents search connected knowledge bases and cite source material. See Knowledge Base. |
| Workflows | Attach shared workflows that agents can invoke as tools to run multi-step processes. See Workflow. |
When to Use Tools
Use tools when you want an agent to act on your request, not just describe how to do it. Common use cases include:
- Generate documents → create PDF, DOCX, or Excel files from a conversation.
- Visualize data → produce charts and graphs from structured input.
- Run database queries → query connected databases and explain the results in plain language.
- Browse the web → navigate pages, extract content, or capture screenshots.
- Execute code → run Python, JavaScript, or TypeScript in a secure sandbox.
- Integrate with external apps → call APIs through MCP servers (for example, messaging, ticketing, or cloud services).
- Run automated workflows → trigger multi-step processes attached to the agent.
The agent chooses and runs the appropriate tools based on your prompt and its configuration.
Security & Permissions
Access to tools is controlled by your organization role and the scope of each resource.
| Role | Tools access |
|---|---|
| Owner / Admin | Full access to create, update, and delete tools and databases. |
| Editor | Can create and manage tools and databases. |
| User / Viewer | Can view tools and use them through agents they have access to. |
Additional security controls include:
- Organization and project scope → tools created at the organization level can be shared across projects. Project-level tools are only available within that project.
- Database read-only mode → database connections can be restricted to read-only queries to prevent unintended writes.
- MCP profile authentication → some MCP servers require each user to configure their own credentials before the agent can call those tools. You will be prompted to set these up from the Dashboard when needed.
- Agent-level attachment → even if a tool exists in your organization, it must be explicitly connected to an agent before that agent can use it.