Skip to main content
Glama
bezata

kObsidian MCP

by bezata

Run Dataview Query

dataview.query
Read-onlyIdempotent

Run custom Dataview Query Language (DQL) queries on your Obsidian vault to filter, list, or table notes, tasks, and metadata using advanced criteria beyond preset tools.

Instructions

Execute an arbitrary Dataview Query Language (DQL) query through the Obsidian Local REST API. The query string is raw DQL — e.g. LIST FROM #inbox, TASK WHERE !completed, TABLE file.mtime FROM "Journal". Requires the Dataview plugin to be enabled in Obsidian and the Local REST API plugin to be configured (OBSIDIAN_API_URL/OBSIDIAN_REST_API_KEY). For common patterns (list-by-tag, list-by-folder, table) the sugar tools dataview.listByTag/listByFolder/table are easier to use — prefer those when applicable and fall back to dataview.query for custom DQL.

Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesA Dataview Query Language (DQL) string. Examples: `LIST FROM #inbox`, `TASK FROM "Journal" WHERE !completed`, `TABLE file.ctime, priority FROM #projects`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.3.5
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changedv0.1.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / query / description
      Added value: +"A Dataview Query Language (DQL) string. Examples: `LIST FROM #inbox`, `TASK FROM \"Journal\" WHERE !completed`, `TABLE file.ctime, priority FROM #projects`."
    • addedOutput schema / description
      Added value: +"Freeform object. The specific shape depends on the tool; see the tool description."
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

The description adds meaningful context beyond the readOnlyHint/idempotentHint annotations by disclosing plugin requirements, authentication configuration, and vault-scoping behavior. However, the statement about a 'vaultPath' argument that overrides vault selection is factually inconsistent with the schema, which undermines trust in the behavioral description. It provides some value but also introduces a false behavioral claim.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a clear purpose statement, followed by examples, alternatives, prerequisites, and vault behavior. It is somewhat long but each sentence adds value. The only structural issue is that the vaultPath mention is placed as a final aside, slightly muddling the otherwise clean flow.

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?

The description covers the essential prerequisites, alternative tools, and vault behavior, and an output schema exists so return values are not required. However, the incorrect vaultPath reference is a significant completeness gap: an agent following the description may attempt to pass an invalid parameter. Additionally, the description does not mention error handling or query syntax validation, which would be useful for a raw DQL tool, though not strictly necessary given the output schema.

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

Parameters2/5

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

The schema already covers the 'query' parameter well (100% coverage), so the baseline is 3. The description adds useful clarification that the query is 'raw DQL' and gives examples, which helps. But it also references a 'vaultPath' parameter that does not exist in the schema (additionalProperties: false). This is actively misleading and could cause an agent to include an invalid parameter, so the score is dropped below baseline.

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

Purpose5/5

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

The description explicitly states the tool's action: 'Execute an arbitrary Dataview Query Language (DQL) query.' It provides concrete examples (LIST FROM #inbox, TASK WHERE !completed) and distinguishes itself from sibling sugar tools like dataview.listByTag by positioning this as the escape hatch for custom DQL. The verb+resource is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly says to prefer dataview.listByTag/listByFolder/table for common patterns and fall back to dataview.query for custom DQL, which is excellent when-to-use guidance. It also lists prerequisites (Dataview plugin, Local REST API config) and explains vault selection behavior. However, the claim that an explicit 'vaultPath' argument can be passed is misleading because the input schema does not include such a parameter (additionalProperties: false), creating confusion for the agent.

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

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/bezata/kObsidian'

If you have feedback or need assistance with the MCP directory API, please join our Discord server