Skip to main content
Glama
dailydaniel

Logseq MCP Server

logseq_exit_editing_mode

Exit the current editing mode in Logseq, optionally keeping the block selected to streamline workflow and enhance productivity in knowledge graph management.

Instructions

Exit current editing mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
select_blockNoKeep block selected after exiting edit mode

Implementation Reference

  • Handler implementation in call_tool() that parses arguments, makes API request to logseq.Editor.exitEditingMode, and returns success message.
    elif name == "logseq_exit_editing_mode":
        args = ExitEditingModeParams(**arguments)
        make_request(
            "logseq.Editor.exitEditingMode",
            [args.select_block]
        )
        return [TextContent(
            type="text",
            text="Exited editing mode" +
                 (" with block selected" if args.select_block else "")
        )]
  • Pydantic input schema defining the select_block parameter for the tool.
    class ExitEditingModeParams(LogseqBaseModel):
        select_block: Annotated[
            bool,
            Field(
                default=False,
                description="Keep block selected after exiting edit mode"
            )
        ]
  • Tool registration in the list_tools() function, including name, description, and schema reference.
    Tool(
        name="logseq_exit_editing_mode",
        description="Exit current editing mode",
        inputSchema=ExitEditingModeParams.model_json_schema(),
    ),
  • Prompt registration in list_prompts() for the tool.
    Prompt(
        name="logseq_exit_editing_mode",
        description="Exit block editing mode",
        arguments=[
            PromptArgument(
                name="select_block",
                description="Keep block selected",
                required=False
            )
        ]
    ),
  • Handler implementation in get_prompt() that handles prompt calls for exiting editing mode.
    elif name == "logseq_exit_editing_mode":
        select_block = arguments.get("select_block", False)
        make_request("logseq.Editor.exitEditingMode", [select_block])
        return GetPromptResult(
            description="Exited editing mode",
            messages=[
                PromptMessage(
                    role="user",
                    content=TextContent(
                        type="text",
                        text="Exited editing" +
                             (" with block selected" if select_block else "")
                    )
                )
            ]
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Exit current editing mode' implies a state change but doesn't disclose behavioral traits like whether this requires specific permissions, what happens to unsaved changes, or if it's reversible. For a state-changing tool with zero annotation coverage, this is inadequate.

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, efficient sentence with zero waste. It's appropriately sized for a simple tool and front-loaded with the core action.

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 tool's complexity (state-changing operation), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'exiting editing mode' means in practice, potential side effects, or return values, leaving significant gaps for an agent to understand the tool's behavior.

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%, with the single parameter 'select_block' fully documented in the schema. The description adds no parameter information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

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

Purpose3/5

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

The description 'Exit current editing mode' clearly states the action (exit) and target (editing mode), but it's somewhat vague about what 'editing mode' entails in Logseq context and doesn't differentiate from sibling tools like logseq_edit_block or logseq_insert_block that also involve editing operations.

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?

No guidance is provided about when to use this tool versus alternatives. It doesn't specify prerequisites (e.g., must be in editing mode first), exclusions, or relationships with sibling tools like logseq_edit_block for entering editing mode.

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