Skip to main content
Glama

Query Base

query_base
Read-onlyIdempotent

Execute a .base file's filters against an Obsidian vault and return matching note paths, optionally layering a named view's filters and ordering.

Instructions

Run a Base file's filters against the vault and return matching note paths. Optionally pick a named view to apply that view's filters and ordering on top of the base-level filters. Supported filter syntax (subset of Obsidian's full DSL): chained methods file.hasTag("tag"), file.hasProperty("key"), file.inFolder("path"), file.linksTo("target"), file.name.contains("x")/.startsWith/.endsWith/.equals, plus .isEmpty/.isNotEmpty on any value; legacy function form taggedWith(file, "tag"); comparisons key == "val", key != x, key contains x, >=, <=, >, <; combinators and:, or:, not:. Recognized file properties: file.name, file.basename, file.folder, file.ext, file.path, file.size, file.ctime, file.mtime, file.tags, file.properties, file.links, file.embeds, file.backlinks. Unsupported clauses are reported as warnings and treated as no-match.

Input Schema

NameRequiredDescriptionDefault
pathYesVault-relative path to the .base file.
viewNoOptional view name (or view type) to apply on top of the base-level filters.
limitNoMaximum number of matching notes to return (1-1000, default: 100).
includeFrontmatterNoIf true, include each row's frontmatter in the output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / path / pattern
      Added value: +"\\.base$"
  2. Addedv2.0.0
  3. Removedv1.9.0
  4. Addedv1.8.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), so extra credit goes to the substantive disclosure that unsupported clauses are reported as warnings and treated as no-match — a non-obvious failure mode that would otherwise cause an agent to silently misread an empty result as 'no matches exist'. It does not, however, say where those warnings appear in the response or whether results are truncated when `limit` is hit.

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

Conciseness3/5

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

The purpose is front-loaded correctly in the first two sentences. However, roughly two-thirds of the text is an exhaustive enumeration of filter DSL syntax, and there is no filter parameter in the schema — the filters live inside the .base file — so this bulk does not help the agent construct a call. It is organized and scannable, but it is reference material occupying a tool description.

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?

For a read-only query tool with four fully documented parameters, the description covers what it does, the optional view layering, and partial return semantics (note paths, plus warnings). The main gap, given there is no output schema, is the response shape: where warnings surface and whether truncation at `limit` is signalled.

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 description coverage is 100%, so the baseline is 3; the description earns more by explaining that `view` applies both the view's filters AND its ordering on top of base-level filters — semantics the schema's one-liner does not convey. `limit` and `includeFrontmatter` are left entirely to the schema, which is acceptable given full coverage.

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 opening sentence gives a specific verb and resource: run a Base file's filters against the vault and return matching note paths. That distinguishes it from read_base (which returns the file itself) and from search_notes, though the description never names those siblings explicitly, so the differentiation is inferable rather than stated.

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

Usage Guidelines3/5

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

The second sentence clarifies an optional mode (apply a named view on top of base-level filters), which tells the agent when to supply `view`. However, there is no guidance on when to prefer this tool over read_base, search_notes, or search_by_frontmatter, and no stated prerequisites for what a valid .base file is.

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