Skip to main content
Glama
markdown-vault-mcp

markdown-vault-mcp

by pvliesdonk

Aggregate Notes

aggregate_documents
Read-onlyIdempotent

Groups matching indexed notes into count-ranked frequency buckets by folder, tag, or UTC month, using filters and full-text queries to summarize vault distribution.

Instructions

Group every matching indexed note into bounded frequency buckets.

Counts cover the whole population. Multi-value tag buckets can sum above total; missing counts notes without a tag value. UTC months use YYYY-MM. Buckets rank by count descending then key.casefold() and raw key.

Input Schema

NameRequiredDescriptionDefault
byYesGroup by folder, configured tag field or UTC modification month.
pathNoCase-sensitive exact vault-relative path, including .md.
fieldNoIndexed field for tag grouping; ignored for folder/month.tags
limitNoMaximum returned buckets, 1-1000; never caps the input population.
queryNoFTS5 expression; blank selects all indexed notes. Malformed syntax matches its literal words.
scopeNoIndexed columns to match: metadata (path, title, headings, summary), body, or all. Terms must match within one indexed section.all
folderNoRestrict to this folder and descendants; empty selects root notes.
filtersNoAND equality over fields in indexed_frontmatter_fields from stats. List fields match a member; computed OKF fields use search instead.
patternNoCase-sensitive path glob; *, ? and bracket classes are wildcards.
modified_afterNoInclusive RFC3339 modification instant with timezone.
modified_beforeNoExclusive RFC3339 modification instant with timezone.
wait_for_pending_writesNoWait for recent index writes. On timeout, answer from the current index with _meta.index_stale=true. Default false.

Output Schema

NameRequiredDescriptionDefault
totalYes
bucketsYes
missingYes
truncatedYes
index_staleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description earns credit for the semantics it adds: counts span the whole population (limit never caps input), multi-value tag buckets can exceed the total, missing values form their own bucket, and buckets are ranked by count desc then casefolded key. That is real behavioral detail an agent cannot get from structured fields.

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?

Dense and front-loaded — five short clauses covering grouping, count semantics, caveats, key format, and ordering, with no filler. The telegraphic phrasing ('missing counts notes without a tag value') is slightly awkward but the compactness is mostly earned.

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?

With an output schema present and 100% schema description coverage, the description only needs to carry behavioral quirks, which it does well for a 12-parameter tool. The remaining gap is the absence of any routing guidance relative to count_documents, stats, and query_documents.

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; the description still adds meaning beyond the schema by specifying the YYYY-MM month key format and the tag-bucket overflow behavior tied to the `by`/`field` parameters. It leaves the remaining filter parameters (pattern, filters, modified_*) to the schema, which is acceptable at 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?

States a specific verb and resource: group every matching indexed note into bounded frequency buckets. An agent can distinguish this from count_documents or stats, though the description never names a sibling to contrast against explicitly.

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?

No when-to-use guidance and no indication of when the aggregation alternatives (count_documents, stats, query_documents) should be preferred. The agent must infer from the purpose that this is the grouping/frequency tool rather than a flat listing.

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