insert_block
Add a new block as a child to an existing parent block in Logseq. Specify content, optional properties, and position (beginning or end) to organize hierarchical knowledge structures efficiently.
Instructions
Inserts a new block as a child of the specified parent block.
Creates hierarchical content by adding children to existing blocks.
The new block is inserted at the beginning (before=True) or end (before=False)
of the parent's children.
Args:
parent_block_id: The ID of the parent block to insert under.
content: The content of the new block.
properties: Optional properties to set on the new block.
before: Whether to insert at the beginning of children (default: False).
Returns:
Information about the created block.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
before | No | ||
content | Yes | ||
parent_block_id | Yes | ||
properties | No |
Input Schema (JSON Schema)
{
"properties": {
"before": {
"default": false,
"title": "Before",
"type": "boolean"
},
"content": {
"title": "Content",
"type": "string"
},
"parent_block_id": {
"title": "Parent Block Id",
"type": "string"
},
"properties": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Properties"
}
},
"required": [
"parent_block_id",
"content"
],
"title": "insert_blockArguments",
"type": "object"
}