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

# Custom Actions

> Connect your APIs so the agent can take actions on behalf of users — look up orders, create tickets, update records, and more.

Custom actions let the AI agent call external APIs during a conversation. When a user asks "Where is my order?" the agent can call your order-lookup API and return the real answer.

## Action types

<Tabs>
  <Tab title="OpenAPI Import">
    Import an OpenAPI (Swagger) specification to automatically create actions for each endpoint.

    <Steps>
      <Step title="Go to Actions">
        Navigate to **Actions** in the dashboard sidebar.
      </Step>

      <Step title="Import OpenAPI spec">
        Click **Import OpenAPI** and paste your spec URL or upload the JSON/YAML file (max 2 MB, spec body max 500K characters).
      </Step>

      <Step title="Select endpoints">
        Choose which endpoints to expose to the agent. Each becomes a callable tool.
      </Step>
    </Steps>

    The agent sees each endpoint as a tool with the operation's summary as the description and the request schema as parameters.
  </Tab>

  <Tab title="Manual Configuration">
    Create actions one at a time with full control over the request.

    | Field | Description | Limit |
    | - | - | - |
    | Name | Tool name the agent sees | 100 chars |
    | Description | When to use this action | 500 chars |
    | URL | Endpoint URL | 2048 chars |
    | Method | HTTP method (GET, POST, PUT, DELETE, PATCH) | — |
    | Parameters | Named parameters with types and descriptions | Max 20 |
    | Body template | JSON template with `{{param}}` placeholders | 10K chars |
    | Headers | Static or dynamic headers | — |
  </Tab>

  <Tab title="MCP Tools">
    Connect Model Context Protocol (MCP) servers to expose their tools to the agent.

    The agent runtime includes a built-in MCP proxy that connects to external MCP servers. Configure the server URL in the dashboard and the proxy discovers available tools automatically.
  </Tab>
</Tabs>

## User tokens

If your API requires user-specific authentication, the widget can forward custom headers to action endpoints via `userTokens`:

```html theme={null}
<script>
  AgenticTrust.initAsync({
    apiUrl: "https://platform.agentictrust.com/api/v1",
    apiKey: "lum_pk_your_api_key",
    userTokens: {
      Authorization: "Bearer user_jwt_here"
    }
  });
</script>
```

<Warning>
  User tokens are forwarded to action endpoints as-is. Only configure tokens for APIs you trust. Max 10 token keys, each value up to 4096 characters.
</Warning>

## Limits

| Resource | Limit |
| - | - |
| Actions per project | 100 |
| Parameters per action | 20 |
| OpenAPI spec size | 500K chars (2 MB file) |


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