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

# routines get

> Fetch a routine by id with full config, integrations, and input schema.

Fetch a single routine by id. Returns the full projection — including the input schema and integration access — that the [`clay routines list`](/cli/reference/routines-list) view strips.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay routines get <routineId>
```

## Arguments

| Argument    | Description                                     |
| ----------- | ----------------------------------------------- |
| `routineId` | Routine id, e.g. `function:t_abc123`. Required. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "function:t_abc123",
  "type": "function",
  "name": "Enrich company",
  "description": "Look up a company by domain.",
  "entityType": "company",
  "access": { "integrations": ["api", "mcp"] },
  "inputSchema": {
    "type": "object",
    "properties": { "domain": { "type": "string" } },
    "required": ["domain"]
  }
}
```

| Field                 | Type                                    | Description                                                                              |
| --------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------- |
| `id`                  | string                                  | Routine id.                                                                              |
| `type`                | `"function"`                            | Routine type. Only `function` is supported by the current CLI.                           |
| `name`                | string                                  | Display name.                                                                            |
| `description`         | string \| null                          | Description, or `null` if not set.                                                       |
| `entityType`          | `"contact" \| "company"` (optional)     | MCP entity type. Omitted when not set.                                                   |
| `access.integrations` | array of `"api" \| "mcp" \| "claygent"` | Integrations the routine is exposed on.                                                  |
| `inputSchema`         | object (optional)                       | JSON Schema for the routine's input. Omitted when the routine does not declare a schema. |

## Errors

| Code             | Exit | Notes                                             |
| ---------------- | ---- | ------------------------------------------------- |
| `not_found`      | 6    | No routine with that id in this workspace.        |
| `auth_forbidden` | 3    | The API key lacks the `cli:all` scope (or `all`). |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay routines get function:t_abc123
clay routines list | jq -r '.data[0].id' | xargs clay routines get
```
