Skip to main content
Glama

Query base

query_base

Run a Bases query in Obsidian to evaluate filters and formulas at runtime, returning view rows as JSON, CSV, TSV, Markdown, or paths.

Instructions

Run a Bases query through Obsidian, which evaluates filters and formulas at runtime. Returns the rows of a view in the chosen format.

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": "query_base"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoBase file name, resolved like a wikilink.
pathNoExact path to the .base file from the vault root.
viewNoView name inside the base. Defaults to the first view.
formatNoOutput format. Default json.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It usefully explains that filters and formulas are evaluated at runtime (vs. returning raw definitions) and that output follows the chosen format, but it omits error behavior, read-only nature, path-resolution failure modes, and what happens with an unknown view name.

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 short sentences, front-loaded with the action and followed by the effect and return shape. No filler, no restatement of the title beyond what is needed.

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?

For a four-parameter, zero-required tool with no output schema, the description gives enough to understand the call and the result shape at a high level. It falls short on how file/path interact when neither or both are supplied, and on failure conditions for missing bases or views.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters are already documented in the schema, including enum values for format and the 'defaults to first view' note. The description only echoes 'view' and 'chosen format' without adding selection rules (e.g., precedence between file and path), so the baseline 3 applies.

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?

States a specific verb and resource ("Run a Bases query") plus two concrete effects: runtime evaluation of filters/formulas and returning view rows in a chosen format. It is clearly distinct from list_bases (which enumerates base files), though it never names that sibling explicitly.

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?

Usage is implied by the phrasing — you run this when you need evaluated results from a base view rather than raw file content. There is no explicit when-to-use/when-not guidance, no mention of using list_bases first to discover base files, and no clarification of file vs. path selection.

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