iflow-mcp_apw124_logseq-mcp

v0.2.0
iflow-mcp_apw124_logseq-mcp Checked 1 day ago Published 10 months ago

MCP server for Logseq integration

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_all_pages

Gets all pages from the Logseq graph. Journal pages can be identified by the "journal?" attribute set to true and will include a "journalDay" attribute in the format YYYYMMDD. Returns: List of all pages in the Logseq graph.

get_page

Gets a specific page from the Logseq graph by name. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Journal pages have specific attributes: - "journal?": true - Indicates this is a journal page - "journalDay": YYYYMMDD - The date in numeric format Args: name: The name of the page to retrieve. Returns: Information about the requested page, or None if not found.

ParameterTypeDescription
name *string

create_page

Creates a new page in the Logseq graph. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Logseq automatically sets "journal?": true and "journalDay": YYYYMMDD. Args: name: The name of the new page. properties: Optional properties to set on the new page. Returns: Information about the created page.

ParameterTypeDescription
name *string
properties

delete_page

Deletes a page from the Logseq graph. ⚠️ This removes the page and all its blocks. Cannot be undone. Args: name: The name of the page to delete. Returns: Result of the deletion operation.

ParameterTypeDescription
name *string

get_page_linked_references

Gets all linked references to a specific page. Returns blocks containing [[Page Name]] links to the specified page. Args: page_name: The name of the page to find references to. Returns: List of blocks that reference the specified page.

ParameterTypeDescription
page_name *string

get_page_blocks

Gets all blocks from a specific page in the Logseq graph. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Returned blocks contain hierarchical structure information: - parent: The parent block's ID - level: The indentation level (1 for top-level, 2+ for indented) - left: The block to the left (typically the parent for indented blocks) Args: page_name: The name of the page to retrieve blocks from. Returns: List of blocks from the specified page.

ParameterTypeDescription
page_name *string

get_block

Gets a specific block from the Logseq graph by its ID. The returned block contains hierarchical structure information: - parent: The parent block's ID - level: The indentation level - left: The block to the left Args: block_id: The ID of the block to retrieve. Returns: Information about the requested block, or None if not found.

ParameterTypeDescription
block_id *string

create_block

Creates a new block on a page in the Logseq graph. Note: Blocks are automatically formatted as bullet points in Logseq UI. Use [[Page Name]] to create links to other pages. Args: page_name: The name of the page to create the block on. content: The content of the new block. properties: Optional properties to set on the new block. Returns: Information about the created block.

ParameterTypeDescription
content *string
page_name *string
properties

insert_block

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.…

ParameterTypeDescription
content *string
parent_block_id *string
beforeboolean
properties

update_block

Updates an existing block in the Logseq graph. Use [[Page Name]] to create links to other pages. Args: block_id: The ID of the block to update. content: The new content for the block. properties: Optional properties to update on the block. Returns: Information about the updated block.

ParameterTypeDescription
block_id *string
content *string
properties

move_block

Moves a block to a new location in the graph. Moves a block and all its children to a different location. - as_child=True: Block becomes a child of the target - as_child=False: Block becomes a sibling after the target Args: block_id: The ID of the block to move. target_block_id: The ID of the target block to move to. as_child: Whether to make the block a child of the target (default: False). Returns: Result of the move operation.

ParameterTypeDescription
block_id *string
target_block_id *string
as_childboolean

remove_block

Removes a block from the Logseq graph. ⚠️ Permanently removes the block and all its children. Cannot be undone. Args: block_id: The ID of the block to remove. Returns: Result of the removal operation.

ParameterTypeDescription
block_id *string

search_blocks

Searches for blocks matching a query in the Logseq graph. Query examples: - page:"Page Name" - blocks on a specific page - "search term" - blocks containing the term - [[Page Name]] - references to a specific page Args: query: The search query. Returns: List of blocks matching the search query.

ParameterTypeDescription
query *string