Skip to main content
Glama

Query a base

query_base
Read-onlyIdempotent

Run a saved base view to retrieve its rows, column values, groups, and summaries from wiki pages you can open. Use it for read-only querying; edit values via page front matter.

Instructions

Runs one view of a base page (an Obsidian .base file, kind "base": a saved query over the pages of its space) and returns its rows: one page per row, its values by column (note properties, file.* fields, formula.* results), the groups and column summaries of the view. Only pages the caller can open are rows. Read-only: change a value with update_page on that page's front matter. Use read_page on the base for its YAML (filters, formulas, views).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
idYesPage id of the base (kind "base")
viewNoView name; the first view when omitted
limitNoRows to return, 1-500 (default 100)
offsetNoRows to skip (paging)

Output Schema

NameRequiredDescriptionDefault
rowsYesOne page per row, values by column id
viewYesThe view answered (null: the base has no views, a default table)
errorNoThe base file could not be read
totalYesRows after the filters, before offset/limit
viewsYesThe views of the base
groupsNo
columnsYesProperty ids (note.x / file.x / formula.x) and their display names
warningsYes
summariesNo
truncatedYesMore pages matched than a base evaluates

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

No annotations cover it, so this description carries the full burden. It names the caller's "openable pages" restriction, the persisted YAML state, and the front-matter edit needed to change a value. It also details the return payload (rows, per-column values, groups, column summaries) and the view's nature. A few behavioral details are missing: what a view's pagination or access-denied behavior looks like, and whether a query is evaluated live.

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?

Three tight sentences: operation and data model first, then the access restriction and the update path, then the pointer to read_page for the YAML. Every clause earns its place, and no sentence is filler.

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?

Complete for a read-only query tool. Output shape is mapped out, permissions are noted, and the sibling tools that mutate or inspect a base are named. With 100% schema coverage and an output schema, nothing essential is missing.

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 coverage is 100%, so the schema documents the id, view, limit, and offset parameters. The description confirms what a view means semantically (YAML views on the base) but adds no paging or format detail beyond the schema; baseline 3 is correct.

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?

States a specific verb and resource — "Runs one view of a base page... and returns its rows" — and defines what a base is (an Obsidian `.base` file, a saved query over its space's pages). That definition alone separates it from read_page and update_page, which it names explicitly.

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?

Gives conditioned alternatives: use update_page on a page's front matter to change a value, and read_page on the base for its YAML filters/formulas/views. A clear context for each. It stops short of an explicit "when not to use this tool" statement, so a 4 rather than a 5.

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