Skip to main content
Glama

Logseq MCP Tools

by apw124

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

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

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/apw124/logseq-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server