---
title: "macro.list: Macros — Doc kit command — Kition"
description: "Runs, defines or deletes a macro (a named list of command steps) and answers the macro list."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/macro.list"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/macro.list](https://developer.kition.ai/docs/kits/doc/commands/macro.list)

# macro.list

**Macros.** Runs, defines or deletes a macro (a named list of command steps) and answers the macro list.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `define` | `object` | no | {"name": string, "steps": [{"command", "params"}]} |
| `delete` | `string` | no |  |
| `run` | `string` | no |  |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "macro.list" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `define`, `delete`, `run`. doc_run answers the step’s result in `completed[i].result`.

## Result



```json
{
  "additionalProperties": true,
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "define": {
      "additionalProperties": true,
      "description": "{\"name\": string, \"steps\": [{\"command\", \"params\"}]}",
      "properties": {
        "name": {
          "type": "string"
        },
        "steps": {
          "description": "[{\"command\", \"params\"}]",
          "items": {
            "additionalProperties": true,
            "properties": {
              "command": {},
              "params": {}
            },
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "delete": {
      "type": "string"
    },
    "run": {
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
