Skip to main content
Glama

dataview_query

Query your Obsidian vault using Dataview DQL and receive structured results as tables, lists, tasks, or calendar events.

Instructions

Run a Dataview DQL query against the vault. Requires the obsidian-brain companion plugin v0.2.0+ installed, Obsidian running against the same vault, and the Dataview community plugin enabled. Returns a normalized discriminated-union shape. kind='table' gives {headers, rows}. kind='list' gives {values}. kind='task' gives {items: [{task, text, path, line, tags, children, ...STask fields when task=true}]}. kind='calendar' gives {events: [{date, link, value?}]}. DQL reference: https://blacksmithgu.github.io/obsidian-dataview/queries/structure/. Default 30s timeout (override with timeoutMs). NOTE: timeoutMs only cancels the HTTP wait; Dataview has no cancellation API, so the query keeps running inside Obsidian to completion. Prefer LIMIT N in DQL for open-ended queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesDQL source, e.g. 'TABLE file.name, rating FROM #book WHERE status = "reading" LIMIT 50'
sourceNoOptional origin file path (vault-relative) to set the DQL origin. Affects `FROM ""` and relative link resolution inside the query.
timeoutMsNoHTTP timeout in ms (default 30000). The Dataview query itself cannot be cancelled; this just bounds how long this tool waits.
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: the return shape (discriminated union with details for each kind), the timeout behavior (only cancels HTTP wait, not the query itself), and the need for specific plugins. This is comprehensive and honest.

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 well-structured and front-loaded with purpose, then prerequisites, then return shapes. It is slightly long but every sentence is informative. Could be tightened slightly, but overall effective.

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

Completeness5/5

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

Given the complexity of the tool (multiple output kinds, no output schema, external dependencies), the description is remarkably complete. It covers prerequisites, return structures, timeout nuance, and best practices. No gaps for an AI agent.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant value: example DQL for 'query', explanation of 'source' as optional origin for relative links, and timeoutMs details (default, no cancellation). This goes well beyond the schema.

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 it runs a Dataview DQL query against the vault, with a specific verb 'Run' and resource 'Dataview DQL query'. It distinguishes itself from sibling tools like search or list_notes by focusing on Dataview's query language.

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 provides explicit prerequisites (plugin versions, Obsidian running, Dataview enabled) and practical guidance like using LIMIT and understanding timeout limitations. It lacks explicit 'when not to use' or direct alternatives, but the context is clear enough.

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/sweir1/obsidian-brain'

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