Skip to main content
Glama
kzmshx

Frontmatter MCP

by kzmshx

query

Run DuckDB SQL queries on frontmatter metadata from markdown files, with optional semantic search to find similar documents based on content.

Instructions

Query frontmatter with DuckDB SQL.

Args: glob: Glob pattern relative to base directory (e.g. "atoms/**/*.md"). sql: SQL query string. Reference 'files' table. Columns are frontmatter properties plus 'path'.

Semantic search (when enabled and indexing is complete): - embedding: document embedding vector (NULL if not indexed) - embed('text'): converts text to embedding vector - array_cosine_similarity(a, b): similarity score (0-1)

Example - find similar documents:
    SELECT path,
           array_cosine_similarity(embedding, embed('search term')) as score
    FROM files WHERE embedding IS NOT NULL
    ORDER BY score DESC LIMIT 10

Returns: Dict with results array, row_count, and columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
globYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description carries full burden. It discloses return format (dict with `results`, `row_count`, `columns`) and semantic search capabilities. Behaviors like read-only nature are implied but not stated; no mention of auth needs or rate limits.

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?

Well-structured with bullet points for semantic search and an example. Front-loaded with purpose. Slightly verbose but each sentence adds value.

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 output schema exists (true), description still explains return values. Covers all parameters, semantic search conditions, and example. Complete for a query tool with distinct sibling tools (update, batch, etc.).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It clearly explains `glob` (glob pattern relative to base directory) and `sql` (SQL query string referencing the `files` table), adding meaning beyond the schema's bare type definitions.

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 clearly states 'Query frontmatter with DuckDB SQL,' specifying the resource (frontmatter files) and action (querying with SQL). It distinguishes this tool from siblings like `query_inspect` by focusing on actual data querying rather than inspection.

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?

Provides detailed usage: glob pattern, SQL query, and conditions for semantic search ('when enabled and indexing is complete'). Includes an example query. However, it does not explicitly exclude when not to use or mention siblings like `query_inspect` for inspection tasks.

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/kzmshx/frontmatter-mcp'

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