add_cell
Insert a new code or markdown cell into a marimo notebook at a specified location, without executing its contents.
Instructions
Add a new cell to a notebook without executing it.
Args: notebook: Path to the notebook file or port number. code: Content for the new cell. after_cell_id: Insert after this cell ID. If None, appends at end. cell_type: "code" (default) or "markdown". Markdown wraps content in mo.md(...).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"notebook": "<notebook>",
"code": "<code>"
},
"name": "add_cell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notebook | Yes | ||
| code | Yes | ||
| after_cell_id | No | ||
| cell_type | No | code |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |