Skip to main content
Glama

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}",

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