Skip to main content
Glama
bezata

kObsidian MCP

Run Dataview Query

dataview.query
Read-onlyIdempotent

Execute custom Dataview Query Language (DQL) queries on your Obsidian vault via the Local REST API. Use for queries not covered by simpler list-by-tag or table helpers.

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

Behavior3/5

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

Annotations already declare readOnly=true, destructive=false, idempotent=true. The description adds context about vault selection, but it mentions a `vaultPath` argument not present in the input schema (additionalProperties: false), which undermines trust. Without that issue, it would be higher.

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?

Two paragraphs: first explains purpose and usage, second details vault behavior. No extraneous text; each sentence provides necessary information. Front-loaded with the primary action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of custom DQL, the description covers prerequisites, sibling alternatives, and vault selection. It omits error handling or output format, but an output schema exists. The missing `vaultPath` parameter is a notable gap.

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

Parameters4/5

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

Schema coverage is 100% with `query` described. The description adds examples and clarifies it's raw DQL, which adds meaning. However, the description also references a `vaultPath` parameter not in the schema, which detracts slightly.

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 clearly states 'Execute an arbitrary Dataview Query Language (DQL) query' and provides concrete examples like `LIST FROM #inbox`. It distinguishes from sibling tools by noting that for common patterns, sugar tools like `dataview.listByTag` are easier to use.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool ('custom DQL') versus alternatives ('prefer those [sugar tools] when applicable'). Mentions prerequisites (Dataview plugin, Local REST API) and notes vault selection behavior via `vault.select` or explicit `vaultPath`.

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

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