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

# AI Custom Tools

> Give Ankra's AI organisation-specific capabilities - sandboxed scripts with a typed input schema the AI can call during conversations and agent runs.

Custom tools extend what Ankra's AI can do with capabilities specific to your organisation: a security scan, an internal API call, a report generator. Each tool is a script with a typed input schema; once enabled, the AI can call it like any built-in tool. Manage them under **AI** → **Settings** → **Capabilities**.

## The Sandbox Model

Tool runs execute as one-shot sandbox jobs on your [staging cluster](/platform/ai-workspaces), isolated from the rest of the platform:

* Runs use a signed runner image with **no Kubernetes API access**.
* Network egress is limited to DNS and HTTPS.
* CPU, memory, and execution time are capped.
* The AI's arguments arrive as JSON in the `TOOL_INPUT` environment variable, validated against your input schema first.

## Creating a Tool

<Steps>
  <Step title="Define the interface">
    Name the tool (lowercase, digits, underscores), describe what it does and when the AI should use it, and provide a JSON Schema for its input. The description is what the AI reads when deciding to call it - make it concrete.
  </Step>

  <Step title="Write the script">
    Pick a runner and write the script. Read `TOOL_INPUT` for arguments; whatever the script prints is returned to the AI.
  </Step>

  <Step title="Set the guardrails">
    Choose a **risk level** (low, medium, high), optionally mark the tool **trusted**, and scope it to all clusters or named clusters only. Secret values come from AI chat secret slots mounted as files - never hardcode credentials in the script.
  </Step>
</Steps>

Every save creates a new version; the version history on each tool shows what changed and when. Tools can be disabled without deleting them - a disabled tool is not offered to the AI.

## Permissions

Creating, editing, enabling, and deleting custom tools requires organisation **admin**. All members can see the tool list and version history.
