logseq_insert_block
Insert new blocks into Logseq to create page-level or nested blocks, manage properties, and set custom UUIDs. Specify positioning relative to parent blocks for precise organization and reference.
Instructions
Insert a new block into Logseq. Can create: - Page-level blocks (use is_page_block=true with page name as parent_block) - Nested blocks under existing blocks - Blocks with custom UUIDs for precise reference Supports before/after positioning and property management.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
before | No | Insert before parent | |
content | Yes | Content of the new block | |
custom_uuid | No | Custom UUID for block | |
is_page_block | No | Page-level block flag | |
parent_block | No | UUID or content of parent block |
Input Schema (JSON Schema)
{
"additionalProperties": false,
"description": "Parameters for inserting a new block in Logseq.",
"properties": {
"before": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Insert before parent",
"title": "Before"
},
"content": {
"description": "Content of the new block",
"title": "Content",
"type": "string"
},
"custom_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom UUID for block",
"title": "Custom Uuid"
},
"is_page_block": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Page-level block flag",
"title": "Is Page Block"
},
"parent_block": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "UUID or content of parent block",
"title": "Parent Block"
}
},
"required": [
"content"
],
"title": "InsertBlockParams",
"type": "object"
}