schema

A command that shows the metadata fields found in indexed Markdown files, including their value types and any declared definitions. It can inspect the whole collection or limit the result to a folder or named Shard, a configured group of files.

In plain words
What is it for?
Use it to inspect schemas for all Markdown documents, a folder such as invoices, or a configured Shard, and optionally return the result as JSON.
Why use it?
It helps you check how document metadata is being interpreted before querying or updating it. This makes inferred types, conflicting values, links, and computed fields visible in one place.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/geckse/markdown-vdb/schema
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.01268
Opus 5 $0.00009 $0.00634
Sonnet 5 $0.00003 $0.00254
Haiku 4.5 $0.00002 $0.00127

Measured 2d ago against content hash d3964beff62a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

schema scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/cli/commands/schema.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mdvdb schema

Show the merged metadata schema for indexed Markdown documents. mdvdb infers fields from YAML frontmatter and applies optional definitions from .markdownvdb.schema.yml, including relations and computed fields.

Usage

mdvdb schema [--path <PREFIX> | --shard <ID>] [GLOBAL OPTIONS]
Flag Description
--path <PREFIX> Restrict the schema to a relative folder prefix
--shard <ID> Use the folder configured for a named Shard

--path and --shard conflict. Without either option, the command returns the collection-wide schema. It also accepts all global options.

Examples

mdvdb schema
mdvdb schema --path invoices
mdvdb schema --shard operations
mdvdb schema --path invoices --json

Field types

JSON serializes these names in PascalCase:

Type Meaning
String Text value
Number Integer or decimal value
Boolean true or false
List YAML sequence
Date Date-shaped text such as 2026-08-06
Mixed More than one incompatible observed type
Relation Whole-value reference to another Markdown document
File Reference to a non-Markdown file
Json Structured object or nested collection
Formula Deterministic value calculated from the current document
Lookup Value copied from a related document
Rollup Formula evaluated over values collected from related documents

Schema overlay

The optional overlay adds annotations, type declarations, relation targets, and computed-field definitions. Global fields apply collection-wide; scopes apply to folder prefixes.

# .markdownvdb.schema.yml
fields:
  status:
    description: Document lifecycle status
    allowed_values: [draft, review, published]
    required: true

scopes:
  invoices:
    fields:
      client:
        field_type: relation
        target: clients
      total:
        field_type: formula
        formula: price * quantity
        result_type: number
      client_domain:
        field_type: lookup
        relation_field: client
        target_field: domain
      related_total:
        field_type: rollup
        relation_field: related_invoices
        target_field: total
        formula: values.reduce((sum, value) => sum + Number(value), 0)
        result_type: number

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 173 lines · 17 tokens per session scan A d3964beff62a

Subscribe to this mod's changes

schema is a command published in the GitHub repository geckse/markdown-vdb (23 stars, last pushed 18d ago), licensed MIT. It adds 17 tokens to every session and 1,268 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories