# Drawings

> Read, create, copy, update and delete drawings on the chart.

Source: https://kcq.nebutra.com/docs/agent/tools/drawings


<Callout>
  Generated from the pinned chart source (

  [`1aa5e22`](https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/foundation/agent/chartToolRegistry.ts)

  ). Descriptions are the exact text the model receives.
</Callout>

drawings_list [#drawings_list]

<ToolMeta label="List drawings" safety="read-only" safetyLabel="Read-only" mode="Runs in parallel" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L779" sourceLabel="Source" />

List every committed chart drawing. Anchors use timestamp and price; rendering indexes and interaction previews are not exposed.

**Parameters**

This tool takes no input.

<ToolSchema name="drawings_list" label="JSON Schema" />

drawing_create [#drawing_create]

<ToolMeta label="Create drawing" safety="destructive" safetyLabel="Modifies the chart" mode="Runs in order" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L795" sourceLabel="Source" />

Create a committed chart drawing using a supported kind and an existing paneId. Required anchor count by kind — 1: horizontal-line, horizontal-ray, vertical-line, cross-line; 2: trend-line, ray, extended-line, fib-retracement, rectangle, arrow, info-line, regression-channel; 3: parallel-channel, flat-line, disjoint-channel. horizontal-line anchors require only price; all other anchors require tradingDate in YYYY-MM-DD format and price. labels is the complete text model keyed by the rendered line or area index.

**Parameters**

| Name                                   | Type                   | Required | Constraints                                                                                                                                                                                                                                                   | Description                   |
| -------------------------------------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| <code>kind</code>                      | <code>enum</code>      | Yes      | one of <code>"trend-line", "ray", "extended-line", "fib-retracement", "rectangle", "arrow", "horizontal-line", "horizontal-ray", "vertical-line", "cross-line", "info-line", "parallel-channel", "regression-channel", "flat-line", "disjoint-channel"</code> |                               |
| <code>paneId</code>                    | <code>string</code>    | Yes      | min length <code>1</code>                                                                                                                                                                                                                                     |                               |
| <code>anchors</code>                   | <code>object\[]</code> | Yes      | min items <code>1</code>; max items <code>3</code>                                                                                                                                                                                                            |                               |
| <code>anchors\[].tradingDate</code>    | <code>string</code>    | —        | pattern <code>^\d\{4}-\d\{2}-\d\{2}$</code>                                                                                                                                                                                                                   |                               |
| <code>anchors\[].price</code>          | <code>number</code>    | Yes      | —                                                                                                                                                                                                                                                             |                               |
| <code>style</code>                     | <code>object</code>    | —        | —                                                                                                                                                                                                                                                             |                               |
| <code>style.stroke</code>              | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code>                                                                                                                                                                                     |                               |
| <code>style.strokeWidth</code>         | <code>number</code>    | —        | > <code>0</code>                                                                                                                                                                                                                                              |                               |
| <code>style.strokeStyle</code>         | <code>enum</code>      | —        | one of <code>"solid", "dashed", "dotted"</code>                                                                                                                                                                                                               |                               |
| <code>style.fill</code>                | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code>                                                                                                                                                                                     |                               |
| <code>style.fillOpacity</code>         | <code>number</code>    | —        | ≥ <code>0</code>; ≤ <code>1</code>                                                                                                                                                                                                                            |                               |
| <code>style.pointRadius</code>         | <code>number</code>    | —        | > <code>0</code>                                                                                                                                                                                                                                              |                               |
| <code>style.textColor</code>           | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code>                                                                                                                                                                                     |                               |
| <code>style.fontSize</code>            | <code>number</code>    | —        | > <code>0</code>                                                                                                                                                                                                                                              |                               |
| <code>labels</code>                    | <code>object</code>    | —        | closed                                                                                                                                                                                                                                                        |                               |
| <code>labels.line</code>               | <code>record</code>    | —        | closed                                                                                                                                                                                                                                                        | 键为渲染输出的线段或区域序号，从 "0" 起的字符串数字。 |
| <code>labels.line.\<n>.text</code>     | <code>string</code>    | —        | —                                                                                                                                                                                                                                                             | 标签文本。使用字面量 \n 作为唯一换行控制码。      |
| <code>labels.line.\<n>.position</code> | <code>enum</code>      | —        | one of <code>"start", "center", "end"</code>                                                                                                                                                                                                                  |                               |
| <code>labels.area</code>               | <code>record</code>    | —        | closed                                                                                                                                                                                                                                                        | 键为渲染输出的线段或区域序号，从 "0" 起的字符串数字。 |
| <code>labels.area.\<n>.text</code>     | <code>string</code>    | —        | —                                                                                                                                                                                                                                                             | 标签文本。使用字面量 \n 作为唯一换行控制码。      |
| <code>labels.area.\<n>.position</code> | <code>enum</code>      | —        | one of <code>"start", "center", "end"</code>                                                                                                                                                                                                                  |                               |
| <code>visible</code>                   | <code>boolean</code>   | —        | —                                                                                                                                                                                                                                                             |                               |
| <code>locked</code>                    | <code>boolean</code>   | —        | —                                                                                                                                                                                                                                                             |                               |
| <code>zIndex</code>                    | <code>number</code>    | —        | —                                                                                                                                                                                                                                                             |                               |

**Minimal input** · Required fields only; placeholders are derived from the schema.

```json
{
  "kind": "trend-line",
  "paneId": "<paneId>",
  "anchors": [
    {
      "price": 0
    }
  ]
}
```

<ToolSchema name="drawing_create" label="JSON Schema" />

drawings_copy [#drawings_copy]

<ToolMeta label="Copy drawings" safety="destructive" safetyLabel="Modifies the chart" mode="Runs in order" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L818" sourceLabel="Source" />

Copy drawings by ID with a shared screen offset. Selects visible, unlocked copies; the entire group is one undo step.

**Parameters**

| Name                    | Type                   | Required | Constraints                                              | Description |
| ----------------------- | ---------------------- | -------- | -------------------------------------------------------- | ----------- |
| <code>drawingIds</code> | <code>string\[]</code> | Yes      | min items <code>1</code>; item min length <code>1</code> |             |

**Minimal input** · Required fields only; placeholders are derived from the schema.

```json
{
  "drawingIds": [
    "<drawingId>"
  ]
}
```

<ToolSchema name="drawings_copy" label="JSON Schema" />

drawing_update [#drawing_update]

<ToolMeta label="Update drawing" safety="destructive" safetyLabel="Modifies the chart" mode="Runs in order" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L834" sourceLabel="Source" />

Update a committed chart drawing by id. labels replaces the complete text model; obtain it from drawings\_list before changing it. Supply at least one patch field. Required anchor count by kind — 1: horizontal-line, horizontal-ray, vertical-line, cross-line; 2: trend-line, ray, extended-line, fib-retracement, rectangle, arrow, info-line, regression-channel; 3: parallel-channel, flat-line, disjoint-channel. horizontal-line anchors require only price; all other anchors require tradingDate in YYYY-MM-DD format and price.

**Parameters**

| Name                                      | Type                   | Required | Constraints                                                               | Description                   |
| ----------------------------------------- | ---------------------- | -------- | ------------------------------------------------------------------------- | ----------------------------- |
| <code>drawingId</code>                    | <code>string</code>    | Yes      | min length <code>1</code>                                                 |                               |
| <code>patch</code>                        | <code>object</code>    | Yes      | —                                                                         |                               |
| <code>patch.anchors</code>                | <code>object\[]</code> | —        | min items <code>1</code>; max items <code>3</code>                        |                               |
| <code>patch.anchors\[].tradingDate</code> | <code>string</code>    | —        | pattern <code>^\d\{4}-\d\{2}-\d\{2}$</code>                               |                               |
| <code>patch.anchors\[].price</code>       | <code>number</code>    | —        | —                                                                         |                               |
| <code>patch.style</code>                  | <code>object</code>    | —        | —                                                                         |                               |
| <code>patch.style.stroke</code>           | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code> |                               |
| <code>patch.style.strokeWidth</code>      | <code>number</code>    | —        | > <code>0</code>                                                          |                               |
| <code>patch.style.strokeStyle</code>      | <code>enum</code>      | —        | one of <code>"solid", "dashed", "dotted"</code>                           |                               |
| <code>patch.style.fill</code>             | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code> |                               |
| <code>patch.style.fillOpacity</code>      | <code>number</code>    | —        | ≥ <code>0</code>; ≤ <code>1</code>                                        |                               |
| <code>patch.style.pointRadius</code>      | <code>number</code>    | —        | > <code>0</code>                                                          |                               |
| <code>patch.style.textColor</code>        | <code>enum</code>      | —        | one of <code>"#4A90D9", "#7C6FCD", "#C08457", "#8B5E83", "#9CA3AF"</code> |                               |
| <code>patch.style.fontSize</code>         | <code>number</code>    | —        | > <code>0</code>                                                          |                               |
| <code>patch.labels</code>                 | <code>object</code>    | —        | closed                                                                    |                               |
| <code>patch.labels.line</code>            | <code>record</code>    | —        | closed                                                                    | 键为渲染输出的线段或区域序号，从 "0" 起的字符串数字。 |
| <code>patch.labels.area</code>            | <code>record</code>    | —        | closed                                                                    | 键为渲染输出的线段或区域序号，从 "0" 起的字符串数字。 |
| <code>patch.visible</code>                | <code>boolean</code>   | —        | —                                                                         |                               |
| <code>patch.locked</code>                 | <code>boolean</code>   | —        | —                                                                         |                               |
| <code>patch.zIndex</code>                 | <code>number</code>    | —        | —                                                                         |                               |

**Minimal input** · Required fields only; placeholders are derived from the schema.

```json
{
  "drawingId": "<drawingId>",
  "patch": {}
}
```

<ToolSchema name="drawing_update" label="JSON Schema" />

drawing_delete [#drawing_delete]

<ToolMeta label="Delete drawing" safety="destructive" safetyLabel="Modifies the chart" mode="Runs in order" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L860" sourceLabel="Source" />

Delete one committed chart drawing by id. Returns whether a drawing was removed.

**Parameters**

| Name                   | Type                | Required | Constraints               | Description |
| ---------------------- | ------------------- | -------- | ------------------------- | ----------- |
| <code>drawingId</code> | <code>string</code> | Yes      | min length <code>1</code> |             |

**Minimal input** · Required fields only; placeholders are derived from the schema.

```json
{
  "drawingId": "<drawingId>"
}
```

<ToolSchema name="drawing_delete" label="JSON Schema" />

drawings_clear [#drawings_clear]

<ToolMeta label="Clear drawings" safety="destructive" safetyLabel="Modifies the chart" mode="Runs in order" origin="Chart core" source="https://github.com/TsekaLuk/KLineChartQuant/blob/1aa5e22c61313a34d08878ad895e604e0d4a85e9/packages/core/src/features/agent/impl/chartAgentController.ts#L875" sourceLabel="Source" />

Delete every committed chart drawing. Interaction previews are not persisted and are unaffected.

**Parameters**

This tool takes no input.

<ToolSchema name="drawings_clear" label="JSON Schema" />
