Skip to main content
Glama
seandavi
by seandavi

query

Run read-only SQL (DuckDB dialect) against the vault metadata index to filter, aggregate, and analyze notes, tags, frontmatter, and wiki-links.

Instructions

Run read-only SQL (DuckDB dialect; SELECT/WITH only) over the vault metadata index. The index is rebuilt from the files — it is never a source of truth.

Schema: notes(path, name, title, type, tags VARCHAR[], aliases VARCHAR[], date, status, frontmatter JSON, modified TIMESTAMP, size, body /* full note text — SELECT specific columns, not * /) links(source / path /, target / wiki-link name as written */)

Examples: SELECT type, count() FROM notes GROUP BY type ORDER BY 2 DESC SELECT path, title FROM notes WHERE list_contains(tags, 'memory') SELECT target, count() n FROM links GROUP BY target ORDER BY n DESC LIMIT 20 SELECT path, json_extract_string(frontmatter, '$.status') FROM notes WHERE type = 'projects'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses the read-only nature, DuckDB dialect, restriction to SELECT/WITH, and importantly notes the index is rebuilt from files and is never a source of truth. It also warns against selecting 'body' with '*', adding safety-relevant behavioral detail. This goes well beyond minimal disclosure.

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 front-loaded with the core purpose, then provides a compact schema and four illustrative examples. Every sentence adds value: the schema clarifies available columns, and examples show realistic queries. It is long but not wasteful, efficiently structured with clear sections.

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?

Given the tool's complexity (SQL dialect, custom schema), the description is remarkably thorough. It includes the table schemas, query constraints, examples, and a caveat about data freshness. An output schema exists, so return-value documentation is not needed. No significant gaps remain for an agent to invoke the tool correctly.

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 0%, so the description must compensate. It provides multiple SQL examples that implicitly demonstrate the 'sql' parameter usage, but the 'limit' parameter is not mentioned at all. The examples give meaningful context for the sql parameter, yet the description falls short of fully compensating for the missing schema descriptions, especially for limit.

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?

The description opens with 'Run read-only SQL (DuckDB dialect; SELECT/WITH only) over the vault metadata index,' which clearly identifies the tool as a SQL query interface for vault metadata. This verb+resource+scope formulation distinguishes it from siblings like search (natural language) and read_note (single note retrieval).

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 states the tool is read-only and works specifically over the metadata index, implying usage for analytical queries rather than full-text or note retrieval. It does not explicitly name alternatives or exclusions, but the context is clear enough that an agent can infer when to use it. Lacks explicit 'use instead' guidance for siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seandavi/vault-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server