Skip to main content
Glama
dailydaniel

Logseq MCP Server

logseq_get_editing_block_content

Retrieve the content of the currently edited block in Logseq, enabling programmatic interaction with knowledge graphs for efficient content management.

Instructions

Get content of currently edited block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler logic in the call_tool decorator. Calls the Logseq API 'logseq.Editor.getEditingBlockContent' with no arguments and returns the result as formatted text content.
    elif name == "logseq_get_editing_block_content":
        result = make_request("logseq.Editor.getEditingBlockContent", [])
        return [TextContent(
            type="text",
            text=f"Current editing block content:\n{result}"
        )]
  • Pydantic model defining the input schema for the tool (no parameters). Used in tool and prompt registrations.
    class GetEditingBlockContentParams(LogseqBaseModel):
        pass
  • Tool registration in the list_tools() method, defining name, description, and input schema.
    Tool(
        name="logseq_get_editing_block_content",
        description="Get content of currently edited block",
        inputSchema=GetEditingBlockContentParams.model_json_schema()  # No parameters
    ),
  • Prompt registration in list_prompts(), for prompt-based invocation.
    name="logseq_get_editing_block_content",
    description="Get content of active editing block",
    arguments=[]
  • Helper lambda in format_no_arg_result dictionary for formatting the tool result in certain contexts.
    'logseq_get_editing_block_content': lambda r: f"Current content:\n{r}",
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 it implies a read operation ('Get'), it doesn't specify whether this requires specific permissions, what happens if no block is being edited (e.g., error or null return), or any rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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, clear sentence with zero wasted words. It's front-loaded with the core action ('Get content'), making it easy to scan and understand quickly. Every word earns its place by specifying the exact resource without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate as a minimal viable explanation. However, it lacks details on behavioral aspects like error conditions or return format, which would be helpful for an agent to use it correctly. Without annotations or output schema, the description should ideally cover more of these contextual elements.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't mention parameters, which is correct for this case. It adds value by clarifying the resource ('currently edited block'), though this is more about purpose than parameter semantics.

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 ('Get') and resource ('content of currently edited block'), making the purpose immediately understandable. It distinguishes from siblings like 'logseq_get_page_content' by specifying 'currently edited block' rather than a named page. However, it doesn't explicitly contrast with 'logseq_get_current_page_content' or 'logseq_edit_block', which slightly limits sibling differentiation.

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. It doesn't mention prerequisites (e.g., whether a block must be actively being edited), exclusions, or comparisons to siblings like 'logseq_get_current_page_content' or 'logseq_get_page_content'. Without this context, an agent might struggle to select the right tool in a given scenario.

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