Skip to main content
Glama
ergut

MCP server for LogSeq

by ergut

query

Search Logseq pages and blocks using DSL expressions for property, tag, task, and logical filters. Returns text or JSON results, including block UUIDs and page info for deep linking.

Instructions

Execute a Logseq DSL query to search pages and blocks. Supports property queries, tag queries, task queries, and logical combinations. Raw datalog ({:query ...} / [:find ...]) is not supported. See https://docs.logseq.com/#/page/queries for query syntax.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
queryYesLogseq DSL query string (e.g., '(page-property status active)', '(and (task todo) (page [[Project]]))')
formatNoOutput format (text or json). JSON returns raw result objects including block UUIDs and page info for deep linking.text
result_typeNoFilter results by typeall

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.8.0
    • addedInput schema / properties / format
      Added value: +{
      +  "default": "text",
      +  "description": "Output format (text or json). JSON returns raw result objects including block UUIDs and page info for deep linking.",
      +  "enum": [
      +    "text",
      +    "json"
      +  ],
      +  "type": "string"
      +}
  2. Addedv1.6.2

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that raw datalog is unsupported and outlines query categories, but omits permissions, side effects, pagination behavior, and result handling details.

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 three tight sentences: purpose first, supported query types second, and key limitation plus documentation link third. Every sentence adds useful information without redundancy.

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?

For a query tool with no output schema and no annotations, the description provides the basic purpose, supported query forms, a hard limitation, and a documentation link. However, it does not help distinguish this tool from siblings or explain result behavior, leaving meaningful gaps.

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%, so the schema already documents all four parameters. The description adds the useful constraint that raw datalog is not accepted, but it does not further explain limit, format, or result_type beyond what the schema provides.

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 states a specific verb (Execute) and resource (Logseq DSL query) and clarifies that it searches pages and blocks. It also lists supported query categories and explicitly excludes raw datalog, but it does not differentiate this tool from sibling tools like search or find_pages_by_property.

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 does not say when to use this tool versus alternatives such as search or find_pages_by_property. It only notes that raw datalog is not supported, which is a constraint on input rather than guidance on tool selection.

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