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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_server_logseq/server.py:568-573 (handler)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 - src/mcp_server_logseq/server.py:268-272 (registration)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 ), - src/mcp_server_logseq/server.py:380-382 (registration)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}",