Skip to main content
Glama
markdown-vault-mcp

markdown-vault-mcp

by pvliesdonk

Count Notes

count_documents
Read-onlyIdempotent

Count matching indexed notes without fetching their content, returning an exact total that ignores search result caps and counts each note once.

Instructions

Count every matching indexed note without fetching content.

The exact total is independent of search result caps and counts each note once.

Input Schema

NameRequiredDescriptionDefault
pathNoCase-sensitive exact vault-relative path, including .md.
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
index_staleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the safety annotations, the description discloses useful behavior: no content is fetched, the total is exact and unaffected by search result caps, and each note is counted once. It does not discuss permissions or index freshness, but the provided annotations and schema already cover the safety profile and pending-write behavior.

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?

The description is two short sentences with the core purpose front-loaded. Every sentence adds useful information about scope and counting behavior, with no redundant wording.

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?

For a count tool with a rich input schema, full schema description coverage, annotations, and an output schema, the description provides the essential behavioral context. It explains the key guarantee that the count is exact and independent of result caps, which is the main thing an agent needs beyond the structured fields.

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?

The input schema already documents every parameter at 100% coverage, so the schema carries the parameter semantics. The description adds only a general notion of 'matching' notes and does not clarify filter combinations, query syntax, or scope beyond what the schema states. This is the expected baseline when schema coverage is complete.

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 states a specific verb and resource: counting matching indexed notes. It also distinguishes itself from content-fetching search tools by saying it operates 'without fetching content' and returns an exact total. It does not name a sibling alternative explicitly, which keeps it just below the top score.

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?

The description gives clear implied usage context: use it when you need a count rather than note content, and when search result caps would distort the total. It lacks an explicit statement of when not to use it or which sibling to choose for retrieving notes, but the intended use case is clear.

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