Skip to main content
Glama

Dataview query

dataview_query
Read-only

Query Obsidian notes by frontmatter, inline fields, and file properties; filter, sort, group, and select results for targeted vault reporting.

Instructions

Execute a Dataview-style query on notes: filter, sort, group and select by frontmatter, inline fields (key:: value) and file properties (path, title, tags, created, modified)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "dataview_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoSource filter: a folder path or a #tag, or a list of them (any may match)
sortNoSort order
limitNoMaximum results (or groups, when grouping)
vaultNoVault name. May be omitted when only one vault is configured; see list_vaults.
whereNoFilter conditions (all must match)
selectNoFields to select (path and title are always included)
groupByNoField to group by

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv2.0.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / from / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / from / description
      Previous value: -"Source filter (folder path or #tag)"New value: +"Source filter: a folder path or a #tag, or a list of them (any may match)"
    • removedInput schema / properties / from / type
      Removed value: -"string"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum results"New value: +"Maximum results (or groups, when grouping)"
    • addedInput schema / properties / limit / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / select / description
      Previous value: -"Fields to select"New value: +"Fields to select (path and title are always included)"
    • addedInput schema / properties / sort / items / properties / direction / description
      Added value: +"Default: asc"
    • addedInput schema / properties / sort / items / properties / field / minLength
      Added value: +1
    • addedInput schema / properties / sort / items / required
      Added value: +[
      +  "field"
      +]
    • changedInput schema / properties / vault / description
      Previous value: -"Vault name"New value: +"Vault name. May be omitted when only one vault is configured; see list_vaults."
    • changedInput schema / properties / where / description
      Previous value: -"Filter conditions"New value: +"Filter conditions (all must match)"
    • addedInput schema / properties / where / items / properties / field / description
      Added value: +"Field name; use dots for nested values"
    • addedInput schema / properties / where / items / properties / field / minLength
      Added value: +1
    • addedInput schema / properties / where / items / properties / value / description
      Added value: +"Value to compare with (not needed for \"exists\"). Dates are YYYY-MM-DD in the server's time zone; compared with a time such as \"modified\", a date means that whole day"
    • changedInput schema / properties / where / items / properties / value / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
    • addedInput schema / properties / where / items / required
      Added value: +[
      +  "field",
      +  "operator"
      +]
    • removedInput schema / required
      Removed value: -[
      -  "vault"
      -]
  2. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds domain context by naming queryable field sources and inline field syntax, but says nothing about result shape, whether groups change the return structure, behavior with zero matches, or how vault resolution works.

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?

A single dense sentence that front-loads the operation and then the supported capabilities. Nothing is redundant, though the parenthetical list of file properties makes it slightly heavy for one sentence and could be scannable as a short list.

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?

Seven optional parameters are fully documented in the schema, and annotations cover read-only semantics. What remains unaddressed is the return value — with no output schema, the description should say what a result row looks like and how groupBy alters it, since that materially affects how an agent consumes the response.

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%, so the baseline is 3, but the description adds meaning beyond the schema by enumerating the queryable field domains — frontmatter, inline fields (key:: value), and file properties path/title/tags/created/modified. That tells an agent which field names are valid, which the schema does not.

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 gives a specific verb ('Execute') plus resource ('Dataview-style query on notes') and enumerates the operations supported: filter, sort, group, select. It also names the field domains that can be queried (frontmatter, inline fields, file properties). It does not differentiate itself from siblings such as get_unique_values or get_note_metadata, so it stops short of a 5.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no sibling is named as an alternative. An agent must infer that this tool is for aggregate/filtered retrieval rather than single-note reads, which is left entirely to inference.

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