Skip to main content
Glama

query_notes

Filter and sort notes by frontmatter fields using equality, containment, numeric comparison, and existence checks to retrieve matching Obsidian notes.

Instructions

Query notes using frontmatter field filters. Supports equality, inclusion (for arrays), and comparison operators.

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": {
      "where": "<where>"
    },
    "name": "query_notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results to return.
whereYesFilter conditions (all must match).
sort_byNoFrontmatter field to sort results by.
sort_orderNoSort direction. Defaults to 'asc'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral load; 'Query' does signal a read-only, non-mutating operation, and the operator summary tells the agent what kinds of matching are possible. It stops short of disclosing default result cap, ordering behavior, or what happens when no filters match, which matters for a tool with a required filter array.

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?

Two short sentences, front-loaded with the mechanism before the operator capability, with no filler. The second sentence largely restates operator support already enumerated in the schema, so it earns slightly less than full marks.

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?

With no annotations and no output schema, the definition is adequate but thin for a four-parameter query tool: it never says whether frontmatter fields are flat or nested, what a result looks like, or how the default limit behaves. The complete schema coverage compensates for much of this, keeping it at minimum-viable completeness.

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 the schema already documents where, limit, sort_by, and sort_order, including the full operator enum meanings. The description's note that 'contains' is for inclusion in arrays adds a small clarification, but nothing about how multiple conditions combine or how sorting interacts with limit — that detail lives in the schema's 'all must match' note.

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 has a specific verb ('Query') and resource ('notes') plus the mechanism ('frontmatter field filters'), which is more precise than a generic search. It does not differentiate itself from siblings like search_notes, list_notes, or get_frontmatter, so an agent must infer that this is the structured-metadata path rather than full-text search.

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 only implied: filtering by frontmatter fields suggests metadata-driven queries, but there is no explicit statement of when to prefer this over search_notes or list_notes, and no exclusion or prerequisite is given. An agent can guess the intended context but gets no routing guidance.

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