Skip to main content
Glama

get_frontmatter

Parse a note's YAML frontmatter from its vault-relative path and return it as structured JSON for metadata inspection or automation.

Instructions

Parse and return the YAML frontmatter of a note as structured JSON.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "get_frontmatter"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesVault-relative path to the note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does signal that the output is 'structured JSON' and that parsing is involved, which hints at read-only behavior. It omits what happens on missing or malformed YAML, whether parsing errors are raised or swallowed, and what the JSON shape looks like.

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?

One sentence, front-loaded with the verb and with zero filler. It is efficient, though its brevity is part of why behavioral edge cases go uncovered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple single-parameter read tool with no output schema, so the description's minimal scope is mostly proportionate. However, with no output schema the description is the only place an agent could learn the return shape or error behavior, and it stays at the level of 'structured JSON'.

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 single parameter is fully documented in the schema, including that the path is vault-relative. The description adds nothing further about path handling, extensions, or resolution rules, so the baseline of 3 applies when schema coverage is 100%.

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-plus-resource pair: 'Parse and return the YAML frontmatter of a note.' An agent can tell this is a read/extraction operation on note metadata. It stops short of naming how it differs from siblings like set_frontmatter or search_by_frontmatter, relying on the verb 'return' alone to imply read-only.

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?

There is no explicit when-to-use statement and no alternative is named. A reader must infer that this is the read path versus set_frontmatter's write path, and nothing says what to do when a note lacks frontmatter or when search_by_frontmatter would be the better choice.

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