# Blocks (/cli/blocks)

Inspect workflow blocks, integration blocks, and triggers available to the workspace.

The catalog reflects the workspace’s allowed integrations, revealed preview blocks, and deployed custom blocks.

These commands accept the [global options](/cli/commands#global-options).

## List blocks \[#list-blocks]

```bash
sim blocks list [options]
```

**Options**

| Option | Required | Description |
| - | - | - |
| `--search <value>` | No | Case-insensitive substring match against the block id, name, and description. |
| `--category <value>` | No | Restrict to one toolbar category. Accepted values: `blocks`, `tools`, `triggers`. |
| `--capability <value>` | No | Restrict to blocks that can start a workflow — the `triggers` category, blocks declaring `triggerAllowed`, and blocks with trigger-mode fields. Accepted values: `trigger`. |
| `--source <value>` | No | Restrict to shipped blocks or to this workspace’s deployed custom blocks. Accepted values: `builtin`, `custom`. |
| `--include-sunset` | No | Include `legacy` and `deprecated` blocks. Off by default: a sunset block keeps executing where it is already placed, but it is not offered for new authoring. Each returned entry carries `sunset.replacedBy`, the block to build with instead. |
| `--no-include-sunset` | No | Send --include-sunset as false. |
| `--sort-by <value>` | No | Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`. Defaults to "id". Accepted values: `id`, `name`, `category`. |
| `--sort-order <value>` | No | Sort direction. Defaults to "asc". Accepted values: `asc`, `desc`. |
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `0`. |

API request and response schemas: [listBlocks](/api-reference/catalog/listBlocks).

## Get block \[#get-block]

```bash
sim blocks get <blockId>
```

**Arguments**

| Argument | Required | Description |
| - | - | - |
| `blockId` | Yes | Block type identifier. An unversioned base type resolves to the newest visible version. The response echoes the resolved ID. A legacy or deprecated block (such as `starter`) is readable by its exact ID, and its description opens with the block that replaces it. |

```text
Reading it for `sim workflows operations apply`:
  id                    the type to add: `blocks get table` answers table_v2 (an add of legacy
                        table is refused); `note` says so when it is not the type asked for
  inputSchema           the field ids inputs takes; operationInputSchema, an operation's own
  inputDefinitions      the block's inputs by name; one a pair of fields shares (tableId for
                        tableSelector and manualTableId) is accepted in place of the pair
  outputs               what it outputs on success; a failed block outputs {"error":"…"}
                        instead, read on its error path as <name.error> (a Function also
                        outputs <name.errorMessage>, the thrown message without line or code)
Block settings such as retry are not fields: `sim workflows operations apply --help`.
```

API request and response schemas: [getBlock](/api-reference/catalog/getBlock).
