create_node_with_codebox
Add a new CherryTree node containing a formatted codebox, with support for syntax highlighting labels, surrounding explanatory text, parent assignment, and tags.
Instructions
Create a node with an embedded codebox.
If content_xml is provided, it is used as the full body (text_before/code/text_after ignored).
Args: name: Node title. text_before: Text before the codebox. code: Code content. syntax: Language (sh, python3, sql, java, etc.). text_after: Text after the codebox. parent_id: Parent node ID (0 = top-level). tags: Tags. content_xml: Raw CherryTree XML body (overrides other content params). See create_node docs.
Returns: Confirmation message followed by byte-by-byte audit report. On XML parse failure, backup is restored automatically (ROLLBACK).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | Yes | ||
| tags | No | ||
| syntax | No | sh | |
| parent_id | No | ||
| text_after | No | ||
| content_xml | No | ||
| text_before | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |