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

# Functions overview

> Adapter-scoped function catalog executed on devices via the Gateway.

# Functions overview

A **Cloud Function** is a named operation Cloud resolves from a registry (or org saved SQL), then sends to the device agent through the Gateway as `db.query` or `db.health`.

## List

```http theme={"system"}
GET /v1/devices/{device_id}/functions
```

Response items include:

| Field         | Meaning                                                  |
| ------------- | -------------------------------------------------------- |
| `id`          | Invoke id (`sicarv4.products.search`, `saved.<uuid>`, …) |
| `adapter`     | `sicarv4` or `*`                                         |
| `description` | Human summary                                            |
| `kind`        | `registry` \| `saved`                                    |
| `params`      | Declared `input` fields for invoke                       |

## Invoke

```http theme={"system"}
POST /v1/devices/{device_id}/functions/{function_id}
```

See [Invoke](/functions/invoke) for body shape and auth rules.

## Policies

| Policy                     | Who builds SQL              | Allowed                               |
| -------------------------- | --------------------------- | ------------------------------------- |
| `read` / `read_only`       | Registry or client (custom) | SELECT / SHOW / DESCRIBE only         |
| `write` / `registry_write` | **Cloud registry only**     | Multi-statement INSERT/UPDATE scripts |

Clients **cannot** send raw mutating SQL. Use `*.create` functions with structured `document` JSON.

## Adapters

| Adapter   | Docs                                                       |
| --------- | ---------------------------------------------------------- |
| `sicarv4` | [SICAR V4 functions](/functions/adapters/sicarv4/overview) |

## Related guides

* [Invoke](/functions/invoke)
* [SICAR V4](/functions/adapters/sicarv4/tables)
