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

# Server-side app tools

> Register HTTPS tools your own server hosts, and Salesive calls them directly when Ola needs them. Works while your app is closed, and needs no iframe.

There are three ways an app gives Ola a tool. This page covers the one that runs
on **your own server**:

| Kind | Where the code runs | Needs the app open | Page |
| - | - | - | - |
| WebMCP | In the embedded dashboard iframe | Yes | [WebMCP tools](https://docs.salesive.com/apps/webmcp-tools.md) |
| Server-side | On your server, over HTTPS | No | This page |
| Remote MCP | On your own MCP server | No | [AI tools from your server](https://docs.salesive.com/apps/mcp-server-tools.md) |

Server-side tools are the middle case: simpler than standing up an MCP server,
and unlike WebMCP they work when the merchant is not looking at your app.

## Register your tools

```http theme={null}
PUT /api/v1/app/tools
Authorization: Bearer <app_ token>
```

```json theme={null}
{
  "tools": [
    {
      "name": "get_stock",
      "description": "Stock level for one SKU in this store's warehouse.",
      "inputSchema": {
        "type": "object",
        "properties": { "sku": { "type": "string" } },
        "required": ["sku"]
      },
      "toolUrl": "https://yourapp.com/tools/get-stock"
    }
  ]
}
```

This **replaces** the whole set for the installation, the way an iframe snapshot
does. Send every tool every time.

| Field | Rules |
| - | - |
| `name` | 30 characters, lowercase letters, digits, `_` and `-`, starting with a letter or digit. |
| `description` | Required, 500 characters. The model reads it to decide when to call. |
| `inputSchema` | Optional JSON Schema object, 8 KiB serialized. |
| `toolUrl` | Required public https URL. Same guard as a webhook: https only, no credentials, no private or loopback address. |

Up to 32 tools per installation. An unknown field, a bad shape, or a URL that
fails the guard rejects the whole request (`invalid_tool`, `invalid_tools`,
`too_many_tools`, `unsafe_url`), so a typo cannot silently register a partial
set.

> [!NOTE]
>
> No OAuth scope is required. Registering a tool is not a write to store data: the
> row is bound to your installation, and the **merchant** decides whether each
> tool is switched on, from the merchant side of your app's settings.

## What Salesive sends you

When Ola calls one of your tools, Salesive `POST`s to that tool's `toolUrl`:

```http theme={null}
POST https://yourapp.com/tools/get-stock
X-Salesive-Signature: <hmac>
X-Salesive-Request-Id: <uuid, same as body id>
Content-Type: application/json
```

```json theme={null}
{
  "id": "5f0e2b9a-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
  "sentAt": "2026-12-01T10:15:00.000Z",
  "tool": { "id": "6782f1c0a1b2c3d4e5f60718", "name": "get_stock", "description": "..." },
  "arguments": { "sku": "TEE-BLK-M" },
  "shopId": "6680aabbccddeeff00112200",
  "installationId": "6699aabbccddeeff00112211"
}
```

Verify the signature over the raw body with the installation's webhook secret,
exactly as for a webhook. `id` and `sentAt` carry the same replay defences as
every other platform call: reject a repeated `id`, and reject a `sentAt` that is
too old.

Answer with JSON. That value is what the model sees.

## Limits

| Limit | Value |
| - | - |
| Tools per installation | 32 |
| Call timeout | 20 seconds |
| Response body | 256 KiB |

A timeout or an unreachable host is recorded as a failed call rather than
retried indefinitely. Keep a tool fast and answer with the smallest useful value.

## What the shopper sees

A server-side tool has **no approval card**, because there is no iframe and no
merchant in front of it. The merchant's protection is the switch: they choose
which of your registered tools their Ola may use. A tool they have not switched
on is not offered to the model.

> [!WARNING]
>
> Because you cannot show a merchant a card, be conservative. Never write, charge
> or send anything irreversible from a tool that could plausibly be called on a
> vague instruction, and say in the description exactly what the tool changes.

## Managing tools

```http theme={null}
GET /api/v1/app/tools
```

Returns the tools your installation has registered, with `enabled` reflecting the
merchant's switch. A tool the merchant has turned off stays in the list and is
simply not offered.

Tools are also what
[subagents](https://docs.salesive.com/apps/subagents.md) can be scoped to: a subagent may list up to 16 tool
names, and every name must already be registered here or the request is refused.


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