Skip to main content
Glama
dailydaniel

Logseq MCP Server

logseq_get_page

Retrieve metadata and content of a specific Logseq page by its identifier, with optional inclusion of child blocks, enabling detailed knowledge graph interaction.

Instructions

Retrieve detailed information about a specific page including metadata and content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_childrenNoInclude child blocks in response
src_pageYesPage identifier (name, UUID or database ID)

Implementation Reference

  • Handler implementation for the logseq_get_page tool: validates input with GetPageParams, calls Logseq API 'logseq.Editor.getPage' with src_page and includeChildren option, formats and returns the page result.
    elif name == "logseq_get_page":
        args = GetPageParams(**arguments)
        result = make_request(
            "logseq.Editor.getPage",
            [
                args.src_page,
                {"includeChildren": args.include_children}
            ]
        )
        return [TextContent(
            type="text",
            text=format_page_result(result)
        )]
  • Pydantic schema/model for logseq_get_page tool inputs: src_page (page identifier as str or int), include_children (optional bool).
    class GetPageParams(LogseqBaseModel):
        """Parameters for retrieving a specific page"""
        src_page: Annotated[
            str | int,
            Field(
                description="Page identifier (name, UUID or database ID)",
                examples=["[[Journal/2024-03-15]]", 12345]
            )
        ]
        include_children: Annotated[
            Optional[bool],
            Field(
                default=False,
                description="Include child blocks in response"
            )
        ]
  • Tool registration in MCP server's list_tools(): defines name, description, and input schema for logseq_get_page.
    Tool(
        name="logseq_get_page",
        description="Retrieve detailed information about a specific page including metadata and content",
        inputSchema=GetPageParams.model_json_schema(),
    ),
  • Prompt registration in MCP server's list_prompts(): defines prompt for logseq_get_page with src_page argument.
    Prompt(
        name="logseq_get_page",
        description="Retrieve information about a specific page",
        arguments=[
            PromptArgument(
                name="src_page",
                description="Page name, UUID or database ID",
                required=True
            )
        ]
    ),
  • Helper function to format the page result from API into readable text output, used by logseq_get_page handler.
    def format_page_result(result: dict) -> str:
        """Format page creation result into readable text."""
        properties = "".join(
            f"  {key}: {value}\n" for key, value in result.get('propertiesTextValues', {}).items()
        )
        properties_text = "\n" + properties if properties else " None"
    
        return (
            f"Created page: {result.get('name')}\n"
            f"UUID: {result.get('uuid')}\n"
            f"Journal: {result.get('journal', False)}\n"
            f"Properties: {properties_text}"
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'retrieve' implies a read-only operation, it doesn't specify whether this requires authentication, has rate limits, or what happens on errors (e.g., if the page doesn't exist). The description mentions 'detailed information' but lacks specifics on response format or potential side effects, leaving significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the key action ('retrieve') and resource ('detailed information about a specific page'), making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving page data with metadata and content, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes (e.g., structure of metadata, content format), potential limitations, or error handling. For a tool with no structured behavioral hints, this leaves too much ambiguity for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning the input schema already documents both parameters ('src_page' and 'include_children') with descriptions and examples. The description adds no additional meaning beyond what the schema provides, such as clarifying parameter interactions or usage examples. However, since the schema coverage is high, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'retrieve' and the resource 'detailed information about a specific page including metadata and content', which is specific and actionable. However, it doesn't explicitly distinguish this tool from sibling tools like 'logseq_get_page_content' or 'logseq_get_all_pages', which reduces the score from a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't explain when to choose 'logseq_get_page' over 'logseq_get_page_content' (which might retrieve just content without metadata) or 'logseq_get_all_pages' (for listing pages). There's no mention of prerequisites or context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

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/dailydaniel/logseq-mcp'

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