# Tools

Source: https://docs.autessa.com/docs/api/poweruser/tools

> Poweruser endpoints for creating, configuring, versioning, publishing, sharing, and deleting tools, including bulk creation from MCP servers.

# Tools

Manage the full lifecycle of tools programmatically: create them, configure their type-specific behavior and arguments, publish and roll back versions, import entire MCP servers as tool sets, and control sharing and ownership.

> All paths on this page are relative to `https://api.autessa.com/autessa_poweruser/tools`. Every request is a POST with a JSON body, and every ID is an opaque string. See the [Poweruser API overview](/docs/api/poweruser.md) for authentication and conventions.

---

## The tool object

Tools are self-contained actions that agents can call. What a tool actually
does is determined by its `toolConfig` — the `toolType` selects one of the
platform's tool implementations, and the `config` map carries that type's
fields.

- `toolId` (string) — Unique tool identifier.
- `companyId` (string) — The owning company.
- `name` (string) — Display name. This is also the function name the model sees, so keep it descriptive.
- `description` (string) — What the tool does. The model uses this when deciding whether to call the tool.
- `toolConfig` (object) — The tool's behavior: `toolType` (string — which implementation runs, e.g. `AUTESSA_SCRIPT`, `API_CALL`, `LLM_CALL`, `SEND_EMAIL`, `AUTESSADB_QUERY_TABLE`, `MCP`, and the rest of the tool-type catalog) and `config` (object — that type's configuration fields). The per-type fields are documented in the [tool-type reference](/docs/tools.md). Config values may contain `{{argumentName}}` placeholders that are filled from the tool's arguments at execution time.
- `parsedToolConfig` (object) — Server-populated typed view of `toolConfig` for the tool's type. Read-only — send changes through `toolConfig`.
- `arguments` (object) — Map of argument name to definition (`description`, `isRequired`, `argumentSchema` — a JSON Schema object). These are the parameters the model fills when calling the tool.
- `privateArguments` (object) — Map of argument name to private-argument definition. Same fields as `arguments` plus `messageToUser` (string — the prompt shown when the value is collected from the end user), `regexValidation` (string), and `allowedValues` (array<string>). Private argument values are never seen or filled by the model. Add `vaultField` (string — such as `CARD_NUMBER`, `CARD_EXPIRY`, `CARD_CVV`, `BANK_ACCOUNT`, `SSN`, or `ACCOUNT_NUMBER`) and `vaultGroup` (string — `PAYMENT_CARD`, `BANK_ACCOUNT`, `SSN`, or `ACCOUNT`) to save the answer for the conversation instead: the tool receives a handle such as `PM_1` in that argument, not the value. See [Protect Sensitive Data](/docs/guide/agentic/sensitive-data.md#private-arguments-that-save-to-the-vault).
- `vaultAccess` (object) — Lets the tool use values saved with [Protect sensitive data](/docs/guide/agentic/sensitive-data.md): `enabled` (boolean, default `false`) and `allowedHosts` (array<string> — the exact hostnames the values may be sent to, over HTTPS only). Without it, `vault.ref` in the tool's script throws `VAULT_ACCESS_DENIED`. See [How tools use the values](/docs/guide/agentic/sensitive-data.md#how-tools-use-the-values).
- `authGate` (object) — **Verify before use.** The person must verify before an agent runs this tool. This is always enforced, even when the [AI Application Firewall](/docs/guide/agentic/ai-application-firewall.md#verification-before-a-tool-runs) is in Monitor or off for the agent: `enabled` (boolean, default `false`), `methods` (array of `WORD_OF_DAY`, `PASSPHRASE`, `TOTP`, `PUSH_APPROVE`; each listed method is asked for in turn and all must pass; `null` uses the company's methods, where the first one that works for the person is enough; an empty list is rejected when `enabled` is `true`), `passphraseId` (string — the company passphrase `PASSPHRASE` checks against; required when `methods` includes `PASSPHRASE`), and `freshnessMinutes` (integer, up to `1440` — ask again if the last verification is older than this; `null` uses the policy's time). A passphrase is never asked for on a phone call or by text message, and the word of the day isn't accepted by text message. The person's answer never reaches the model. On update, omit it to keep the current value.
- `disclosure` (object) — **Sensitive records.** Marks the tool as returning sensitive records, which count toward the firewall's [sensitive-record limits](/docs/guide/agentic/ai-application-firewall.md#sensitive-record-limits). Only tools you mark count; nothing is decided by AI. Fields: `sensitive` (boolean), `countBy` (`CALL` — 1 per call; `RESULT_ITEMS` — each item of the list at `path`; `DISTINCT_VALUES` — each distinct value at `path`), `path` (string — a dot path into the result, such as `results` or `results[].employeeId`), and `label` (string — what the records are, such as "employee records", used in alerts). On update, omit it to keep the current value.
- `voiceAnnouncement` (object) — What the voice says while this tool runs on a call: `phrases` (array<string> — the tool's own short lines, taken in turn; empty uses general lines such as "One second.", in Spanish on a Spanish-speaking number), `when` (`AT_START`, the default, speaks as soon as the tool is called; `IF_SLOW` speaks only if the tool leaves the line silent for the agent's `delayMs`), and `silent` (boolean — never announce this tool). Either way nothing is said if the agent already spoke that turn. A plain string is accepted as one phrase, and `"SILENT"` as `{"silent": true}`. Phone call-control tools are silent by default; all but `PHONE_SECURE_COLLECT` can opt in with `"silent": false` and phrases. On update, omit it to keep the current value; send `{}` to clear it. Example: `{"phrases": ["Let me pull up your order.", "Checking on that order now."]}`. The lines are pre-generated in the agent's voice when a call starts, so they play instantly. For agents that [speak more than one language](/docs/guide/agentic/phone-numbers.md#agents-that-speak-more-than-one-language), `phrasesByLanguage` (object — keyed by the two-letter language, such as `es` or `fr`, each an array of up to 10 lines of up to 200 characters) gives the tool its lines in each language. `phrases` is used for the agent's default language unless `phrasesByLanguage` has an entry for it. Once a call switches to another language, the tool uses that language's entry, or the general lines for that language when there's none. Example: `{"phrases": ["Let me pull up your order."], "phrasesByLanguage": {"es": ["Déjeme buscar su pedido."]}}`. See [What the voice says while tools run](/docs/guide/agentic/phone-numbers.md#what-the-voice-says-while-tools-run).
- `lastPublishedTime` (string) — ISO-8601 timestamp of the last publish, or absent if never published.
- `tags` (array<string>) — Free-form organizational tags. Tools created from MCP servers are tagged with `mcp` and the server's hostname.
- `sensitiveOutput` (boolean) — When `true`, the tool's result is returned to the person who ran it but never stored: tool history, execution details, and logs record `[sensitive result not recorded]` instead. Only a signed-in person can run the tool (builder, CLI, or an app in the default hosting mode); every other caller gets `403` `SENSITIVE_TOOL_REQUIRES_USER`. The tool can't be attached to an agent. Changing it requires ADMIN. Defaults to `false`. See [Sensitive output](/docs/guide/agentic/tools.md#sensitive-output).

```json title="Tool object"
{
  "toolId": "kZ3mQ9pW2x",
  "companyId": "cP2mK7dX4v",
  "name": "SendOrderUpdate",
  "description": "Emails the customer an update about their order.",
  "toolConfig": {
    "toolType": "SEND_EMAIL",
    "config": {
      "recipientEmail": "{{recipientEmail}}",
      "subject": "Update on your order",
      "messageBody": "{{updateText}}"
    }
  },
  "arguments": {
    "recipientEmail": {
      "description": "Email address of the customer",
      "isRequired": true,
      "argumentSchema": { "type": "string" }
    },
    "updateText": {
      "description": "The update to send",
      "isRequired": true,
      "argumentSchema": { "type": "string" }
    }
  },
  "privateArguments": {},
  "lastPublishedTime": "2026-06-28T17:42:10",
  "tags": ["support"]
}
```

---

## Versioning and access levels

Tools follow the platform-wide draft/published model (see the
[Versions guide](/docs/guide/agentic/versions.md)):

- **Draft** — [`/update`](#update-a-tool) always edits the draft working copy.
- **Published** — [`/publish`](#publish-a-tool) snapshots the draft as a new
  published version; the previously published version becomes **archived**.
- **Rollback** — [`/rollback`](#roll-back-a-tool) republishes an archived
  version without touching the draft.

Endpoints enforce the caller's access level on the tool (the poweruser key
acts as its linked user):

| Operation | Required access |
|-----------|-----------------|
| `get`, `all`, `versions`, `get-sharing-details` | Any access (READ or higher) |
| `update` | WRITE, PUBLISH, or ADMIN |
| `publish`, `rollback` | PUBLISH or ADMIN |
| `delete`, `share` | ADMIN |
| `transfer-ownership` | Owner only |

---

## Create a tool

**POST** `/tools/create`

Creates a new tool as a private draft. `toolName` and `toolDescription` are
both required — creation fails with an error message if either is blank. The
new tool starts with a placeholder `AUTESSA_SCRIPT` config; set the real
`toolType`, `toolConfig`, and arguments with [`/update`](#update-a-tool), then
[`/publish`](#publish-a-tool) to make it usable by published agents.

See the [tool-type reference](/docs/tools.md) for the configuration fields each
`toolType` accepts.

### Request parameters

- `toolName` (string, required) — Display name. Must be non-blank.
- `toolDescription` (string, required) — Description of what the tool does. Must be non-blank — the model relies on it to pick the right tool.

### Response

- `tool` (Tool) — The newly created tool object.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/tools/create \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolName": "SendOrderUpdate",
    "toolDescription": "Emails the customer an update about their order."
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/tools/create',
  {
    method: 'POST',
    headers: {
      'Authorization': process.env.POWERUSER_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      toolName: 'SendOrderUpdate',
      toolDescription: 'Emails the customer an update about their order.'
    })
  }
);

const { tool } = await response.json();
console.log(tool.toolId);
```

**Python:**

```python
import os
import requests

response = requests.post(
    'https://api.autessa.com/autessa_poweruser/tools/create',
    headers={'Authorization': os.environ['POWERUSER_KEY']},
    json={
        'toolName': 'SendOrderUpdate',
        'toolDescription': 'Emails the customer an update about their order.'
    }
)

tool = response.json()['tool']
```

```json title="Response (truncated)"
{
  "tool": {
    "toolId": "kZ3mQ9pW2x",
    "companyId": "cP2mK7dX4v",
    "name": "SendOrderUpdate",
    "description": "Emails the customer an update about their order.",
    "toolConfig": {
      "toolType": "AUTESSA_SCRIPT",
      "config": { "script": "..." }
    },
    "arguments": {},
    "privateArguments": {}
  },
  "errors": []
}
```

---

## Get a tool

**POST** `/tools/get`

Retrieves a tool's full configuration. Without a `version` parameter you get
the current draft working copy; pass `version` to read a specific published
or archived snapshot.

### Request parameters

- `toolId` (string, required) — The tool to fetch.
- `version` (object) — Optional version selector: `versionState` (`PUBLISHED`, `DRAFT`, or `ARCHIVED`; defaults to `PUBLISHED` when the object is present) and an optional `versionNumber`.

### Response

- `tool` (Tool) — The tool object.
- `permission` (string) — The calling user's access level on this tool: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/tools/get \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "kZ3mQ9pW2x",
    "version": { "versionState": "PUBLISHED" }
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/tools/get',
  {
    method: 'POST',
    headers: {
      'Authorization': process.env.POWERUSER_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ toolId: 'kZ3mQ9pW2x' })
  }
);

const { tool, permission } = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    'https://api.autessa.com/autessa_poweruser/tools/get',
    headers={'Authorization': os.environ['POWERUSER_KEY']},
    json={'toolId': 'kZ3mQ9pW2x'}
)

data = response.json()
```

```json title="Response (truncated)"
{
  "tool": {
    "toolId": "kZ3mQ9pW2x",
    "name": "SendOrderUpdate",
    "toolConfig": { "toolType": "SEND_EMAIL", "config": { "subject": "Update on your order" } }
  },
  "permission": "ADMIN",
  "errors": []
}
```

---

## List all tools

**POST** `/tools/all`

Lists every tool visible to the linked user, grouped by how they have
access. Entries are lightweight summaries — use [`/get`](#get-a-tool) for the
full configuration.

### Request parameters

None — send an empty object `{}`.

### Response

- `ownedTools` (array<Tool>) — Tools the linked user owns.
- `companySharedTools` (array<Tool>) — Tools shared with the whole company.
- `sharedWithMeTools` (array<Tool>) — Tools shared specifically with the linked user.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/all \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

```json title="Response"
{
  "ownedTools": [
    {
      "toolId": "kZ3mQ9pW2x",
      "name": "SendOrderUpdate",
      "description": "Emails the customer an update about their order.",
      "tags": ["support"],
      "lastPublishedTime": "2026-06-28T17:42:10"
    }
  ],
  "companySharedTools": [],
  "sharedWithMeTools": [],
  "errors": []
}
```

---

## Update a tool

**POST** `/tools/update`

Replaces the tool's draft configuration with `updatedTool`. This is a
whole-object update: fetch the draft with [`/get`](#get-a-tool), modify it,
and send the full object back. Published versions are unaffected until you
[`/publish`](#publish-a-tool).

This is where you set the tool's real behavior — `toolConfig.toolType`
selects the implementation and `toolConfig.config` carries its fields. The
required and optional config fields for every type are listed in the
[tool-type reference](/docs/tools.md). Define the model-facing parameters in
`arguments` and reference them from config values as `{{argumentName}}`.

Requires WRITE, PUBLISH, or ADMIN access. Changing `sensitiveOutput`
requires ADMIN; leaving it out of `updatedTool` keeps the stored value.
Turning it on while an agent uses the tool fails with `422`
`SENSITIVE_TOOL_NOT_AGENT_ATTACHABLE`.

### Request parameters

- `toolId` (string, required) — The tool to update.
- `updatedTool` (Tool, required) — The complete tool object to store as the new draft, using the [tool object](#the-tool-object) shape.

### Response

- `updatedTool` (Tool) — The stored draft.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/tools/update \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "kZ3mQ9pW2x",
    "updatedTool": {
      "toolId": "kZ3mQ9pW2x",
      "name": "SendOrderUpdate",
      "description": "Emails the customer an update about their order.",
      "toolConfig": {
        "toolType": "SEND_EMAIL",
        "config": {
          "recipientEmail": "{{recipientEmail}}",
          "subject": "Update on your order",
          "messageBody": "{{updateText}}"
        }
      },
      "arguments": {
        "recipientEmail": {
          "description": "Email address of the customer",
          "isRequired": true,
          "argumentSchema": { "type": "string" }
        },
        "updateText": {
          "description": "The update to send",
          "isRequired": true,
          "argumentSchema": { "type": "string" }
        }
      },
      "privateArguments": {}
    }
  }'
```

**JavaScript:**

```javascript
// Read-modify-write the draft
const base = 'https://api.autessa.com/autessa_poweruser/tools';
const headers = {
  'Authorization': process.env.POWERUSER_KEY,
  'Content-Type': 'application/json'
};

const getResp = await fetch(`${base}/get`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ toolId: 'kZ3mQ9pW2x' })
});
const { tool } = await getResp.json();

tool.toolConfig = {
  toolType: 'SEND_EMAIL',
  config: {
    recipientEmail: '{{recipientEmail}}',
    subject: 'Update on your order',
    messageBody: '{{updateText}}'
  }
};

await fetch(`${base}/update`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ toolId: tool.toolId, updatedTool: tool })
});
```

**Python:**

```python
import os
import requests

headers = {'Authorization': os.environ['POWERUSER_KEY']}
base = 'https://api.autessa.com/autessa_poweruser/tools'

tool = requests.post(f'{base}/get', headers=headers,
                     json={'toolId': 'kZ3mQ9pW2x'}).json()['tool']

tool['toolConfig'] = {
    'toolType': 'SEND_EMAIL',
    'config': {
        'recipientEmail': '{{recipientEmail}}',
        'subject': 'Update on your order',
        'messageBody': '{{updateText}}'
    }
}

requests.post(f'{base}/update', headers=headers,
              json={'toolId': tool['toolId'], 'updatedTool': tool})
```

```json title="Response (truncated)"
{
  "updatedTool": {
    "toolId": "kZ3mQ9pW2x",
    "name": "SendOrderUpdate",
    "toolConfig": { "toolType": "SEND_EMAIL", "config": { "subject": "Update on your order" } }
  },
  "errors": []
}
```

---

## Publish a tool

**POST** `/tools/publish`

Snapshots the current draft as a new published version. Agents that use the
tool's published version pick up the change; the previously published
version becomes archived and remains available for
[`/rollback`](#roll-back-a-tool).

Requires PUBLISH or ADMIN access.

### Request parameters

- `toolId` (string, required) — The tool to publish.

### Response

- `publishedToolVersion` (integer) — The new published version number.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/publish \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "kZ3mQ9pW2x" }'
```

```json title="Response"
{
  "publishedToolVersion": 3,
  "errors": []
}
```

---

## Roll back a tool

**POST** `/tools/rollback`

Republishes an archived version, making it the live published version again.
The draft working copy is not changed. Use [`/versions`](#list-versions) to
find rollback candidates. `versionToRollback` is required.

Requires PUBLISH or ADMIN access.

### Request parameters

- `toolId` (string, required) — The tool to roll back.
- `versionToRollback` (integer, required) — The archived version number to republish.

### Response

- `newPublishedVersion` (integer) — The version number now published.
- `errors` (array<string>) — Error messages, if any occurred (for example `"Failed to rollback tool to specified version"`).

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/rollback \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "kZ3mQ9pW2x", "versionToRollback": 2 }'
```

```json title="Response"
{
  "newPublishedVersion": 4,
  "errors": []
}
```

---

## List versions

**POST** `/tools/versions`

Returns the tool's published version and all archived version numbers.

### Request parameters

- `toolId` (string, required) — The tool to inspect.

### Response

- `currentPublishedVersion` (integer) — The live published version, or absent if the tool was never published.
- `archivedVersions` (array<integer>) — Previously published version numbers available for rollback.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/versions \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "kZ3mQ9pW2x" }'
```

```json title="Response"
{
  "currentPublishedVersion": 3,
  "archivedVersions": [1, 2],
  "errors": []
}
```

---

## Create tools from an MCP server

**POST** `/tools/create-from-mcp`

Connects to a registered MCP server, lists its tools, and creates one
Autessa tool per MCP tool. Each created tool:

- has `toolType: MCP` bound to the server and the MCP tool's name,
- gets its `arguments` parsed from the MCP tool's JSON Schema input schema,
- is tagged with `mcp` and the server's hostname.

Creation is best-effort per tool: if one MCP tool fails to convert, the rest
are still created. An error is returned only when the server can't be
reached, exposes no tools, or every conversion fails. Register servers first
through the [MCP API](/docs/api/poweruser/mcp.md).

### Request parameters

- `mcpServerId` (string, required) — The registered MCP server to import tools from.

### Response

- `createdTools` (array<Tool>) — The tools that were created, one per MCP tool.
- `errors` (array<string>) — Error messages, if any occurred (for example `"MCP server not found or access denied"` or `"No tools found on MCP server"`).

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/create-from-mcp \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mcpServerId": "mQ4xT8rY2b" }'
```

```json title="Response (truncated)"
{
  "createdTools": [
    {
      "toolId": "pR7vN2sK9j",
      "name": "search_issues",
      "description": "Search issues in the tracker.",
      "toolConfig": {
        "toolType": "MCP",
        "config": {
          "mcpServerId": "mQ4xT8rY2b",
          "mcpToolName": "search_issues"
        }
      },
      "tags": ["mcp", "mcp_example_com"]
    }
  ],
  "errors": []
}
```

---

## Share a tool

**POST** `/tools/share`

Sets the tool's sharing level and per-user grants in one call.

Requires ADMIN access on the tool.

> This endpoint changes the same sharing as the [Share dialog](/docs/guide/platform/sharing.md). Sharing with `COMPANY` adds a company-wide grant and keeps everyone already shared individually at their own level. People get the highest level from any grant that covers them.

### Request parameters

- `toolId` (string, required) — The tool to share.
- `level` (string) — Sharing level: `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `accessLevel` (string) — When `level` is `COMPANY`, the access level every company member gets: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `usersToAdd` (array<UserShare>) — Users to grant access. Each entry: `userEmail` or `userId` (string), plus `accessLevel`.
- `usersToRemove` (array<UserShare>) — Users whose access to revoke, same entry shape.

### Response

- `level` (string) — The resulting sharing level.
- `accessLevel` (string) — The resulting company-wide access level, when shared with the company.
- `usersWithAccess` (array<UserShare>) — The resulting per-user grants (populated when the tool is shared with specific members).
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/share \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "kZ3mQ9pW2x",
    "level": "SPECIFIC_MEMBER",
    "usersToAdd": [
      { "userEmail": "sam@acme.com", "accessLevel": "WRITE" }
    ],
    "usersToRemove": []
  }'
```

```json title="Response"
{
  "level": "SPECIFIC_MEMBER",
  "usersWithAccess": [
    {
      "userEmail": "sam@acme.com",
      "userId": "uB7nT2wQ9k",
      "accessLevel": "WRITE"
    }
  ],
  "errors": []
}
```

---

## Get sharing details

**POST** `/tools/get-sharing-details`

Returns the tool's current sharing configuration and the calling user's own
access level.

### Request parameters

- `toolId` (string, required) — The tool to inspect.

### Response

- `sharingLevel` (string) — `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `companyPermissionLevel` (string) — Access level granted company-wide, when `sharingLevel` is `COMPANY`.
- `sharedWith` (array<UserShare>) — Per-user grants: `userEmail`, `userId`, `accessLevel`.
- `userAccessLevel` (string) — The calling user's effective access level.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/get-sharing-details \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "kZ3mQ9pW2x" }'
```

```json title="Response"
{
  "sharingLevel": "SPECIFIC_MEMBER",
  "companyPermissionLevel": null,
  "sharedWith": [
    {
      "userEmail": "sam@acme.com",
      "userId": "uB7nT2wQ9k",
      "accessLevel": "WRITE"
    }
  ],
  "userAccessLevel": "ADMIN",
  "errors": []
}
```

---

## Delete a tool

**POST** `/tools/delete`

Permanently deletes a tool, including its draft and version history. The
delete is refused with a `422` status while any agent still uses the tool —
the `errors` array names each blocking agent, for example
`"Support Triage Agent is currently using tool. Remove all usages before deleting"`.
Detach the tool from those agents first.

Requires ADMIN access on the tool.

### Request parameters

- `toolId` (string, required) — The tool to delete.

### Response

- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/delete \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "toolId": "kZ3mQ9pW2x" }'
```

```json title="Response"
{
  "errors": []
}
```

```json title="Response (tool still in use, HTTP 422)"
{
  "errors": [
    "Support Triage Agent is currently using tool. Remove all usages before deleting"
  ]
}
```

---

## Transfer ownership

**POST** `/tools/transfer-ownership`

Transfers the tool to another member of the company. Only the **current
owner** may call this, and the new owner must already have some access to
the tool (share it with them first).

### Request parameters

- `toolId` (string, required) — The tool to transfer.
- `newOwnerId` (string, required) — User ID of the new owner. Must be a member of the company with existing access to the tool.

### Response

- `errors` (array<string>) — Error messages, if any occurred (for example `"New owner does not have access to tool yet."`).

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/tools/transfer-ownership \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "kZ3mQ9pW2x",
    "newOwnerId": "uB7nT2wQ9k"
  }'
```

```json title="Response"
{
  "errors": []
}
```

---

## Errors

| Status | When |
|--------|------|
| `200` | Success — check `errors` for validation messages (blank name/description on create, missing `versionToRollback`, MCP server unreachable). |
| `401` | The linked user lacks the required access level (see the [access table](#versioning-and-access-levels)), or is not the owner for `transfer-ownership`. |
| `403` | Scoped key without the endpoint in its allow-list, or a change to `sensitiveOutput` without ADMIN on the tool. |
| `422` | `delete` refused because agents still use the tool; `errors` names them. Also `SENSITIVE_TOOL_NOT_AGENT_ATTACHABLE` when turning on `sensitiveOutput` for a tool an agent uses. |
| `408` | Server-side error; `errors` contains the message. |

---

## Related

- [Poweruser API overview](/docs/api/poweruser.md)
- [Agents (Poweruser API)](/docs/api/poweruser/agents.md)
- [Managers (Poweruser API)](/docs/api/poweruser/managers.md)
- [MCP servers (Poweruser API)](/docs/api/poweruser/mcp.md)
- [Tool-type reference](/docs/tools.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [Versions guide](/docs/guide/agentic/versions.md)

