> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a custom tool

> Make your own Python function callable from workflow steps, validated in the sandbox before it's saved.

export const DocMeta = ({type, applies, owner}) => {
  const LABELS = {
    tutorial: "Tutorial",
    "how-to": "How-to guide",
    explanation: "Explanation",
    reference: "Reference"
  };
  return <div className="e6-meta">
      <span className={type === "how-to" || type === "tutorial" ? "e6-eyebrow" : "e6-eyebrow e6-eyebrow--quiet"}>{LABELS[type] || type}</span>
      {applies ? <span>Applies to: {applies}</span> : null}
      {owner ? <span>Owner: {owner}</span> : null}
    </div>;
};

<DocMeta type="how-to" applies="All deployments" />

A tool is a callable function with a declared JSON input schema and return type. AgentFlow ships a core catalog, such as running SQL, searching the schema catalog, reading and writing files, and sending email or Slack messages. **Agent Tools** add your own.

Use them for repeatable customer-system operations, proprietary calculations, parsers and connection wrappers. Examples: an MES lookup, an SAP wrapper, a proprietary KPI calculator, or a connection to an inspection system.

## Add a tool

In the **Agent Tools** UI, or by describing it in chat:

1. Name and describe the tool.
2. Define its JSON input schema and return type.
3. Provide a single Python function.
4. Declare allowed imports and exactly pinned additional requirements.
5. Set a timeout.
6. Add test cases.
7. Run validation, fix any AST, dependency or sandbox error, and save.

A failed validation blocks the save. AgentFlow runs syntax and AST checks plus sandbox execution.

## Where a tool can run

A tool is available only to the workflow steps that name it. Agent Tools are versioned per project and user. Runtime availability depends on the saved definition, the project or user scope, and the step that names the tool.

## Related

* [Custom skills](/agentflow/extend/custom-skills): a skill is a playbook, a tool is a function call.
* [Safe by design](/agentflow/concepts/safe-by-design): sandbox isolation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.