Skip to main content
Glama

Set lifecycle frontmatter

set_frontmatter
Destructive

Update frontmatter fields on an existing memory note to track lifecycle changes: invalidate outdated facts, adjust confidence, or record rejected options, preserving the Markdown body.

Instructions

Use this when a fact's lifecycle changes: verified today, superseded by a newer note, or confidence raised or lowered. Prefer invalidating an outdated fact (invalid_at + invalidated_by) over deleting or rewriting it: history stays queryable. Use rejected entries in 'option -- reason' format to record discarded options so a future agent does not propose them again. Update frontmatter fields on an existing memory note. This write operation only changes origin, confidence, last_verified, supersedes, rejected, valid_from, invalid_at, invalidated_by, last_id, and the automatic updated timestamp. last_id requires expected_hash, accepts BL- plus at least four ASCII digits, and cannot decrease an existing valid counter. The Markdown body is preserved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originNo
last_idNo
rejectedNo
rel_pathYes
confidenceNo
invalid_atNo
request_idNo
supersedesNo
valid_fromNo
expected_hashNo
last_verifiedNo
invalidated_byNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexedYes
updatedNo
rel_pathNo
replayedNo
committedNo
content_hashYes
operation_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.10
    • addedInput schema / properties / last_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Last Id"
      +}
  2. Changed9 schema fields changedv0.1.5
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Request Id"
      +}
    • addedOutput schema / properties / committed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Committed"
      +}
    • addedOutput schema / properties / operation_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Operation Id"
      +}
    • addedOutput schema / properties / rel_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Rel Path"
      +}
    • addedOutput schema / properties / replayed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Replayed"
      +}
    • removedOutput schema / properties / updated / $ref
      Removed value: -"#/$defs/UpdatedFrontmatterOutput"
    • addedOutput schema / properties / updated / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/UpdatedFrontmatterOutput"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / updated / default
      Added value: +null
    • changedOutput schema / required
      Previous value: -[
      -  "updated",
      -  "content_hash",
      -  "indexed"
      -]New value: +[
      +  "content_hash",
      +  "indexed"
      +]
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare this is a destructive, non-read-only, non-idempotent write; the description adds value beyond that by naming exactly which fields are mutated, confirming the Markdown body is preserved, and specifying the last_id format/auth-like constraint (expected_hash required, BL- prefix, no decreasing counter). It does not, however, explain what deletion/destruction actually occurs, which is notable given destructiveHint=true.

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?

The lifecycle trigger is front-loaded before the operational details, and sentences are dense with substance. Slightly long, but each clause (invalidating over deleting, rejected format, field list, last_id rules) earns its place.

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

Completeness4/5

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

For a 12-parameter destructive write with an output schema (so return values need not be explained), the description covers the lifecycle model, conflict/invalidations semantics, and the highest-risk parameter constraint. It stops short of explaining how several optional fields interact, but the essential calling context is present.

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 coverage is 0%, so the description must carry the load, and it does add real semantics for the tricky parameters: last_id format and its expected_hash dependency, and the rejected 'option -- reason' format. But the remaining ~9 parameters (origin, supersedes, confidence, valid_from, invalid_at, invalidated_by, last_verified, request_id, expected_hash) are only named, not explained. Partial compensation for a 0% coverage schema.

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?

States a specific verb+resource ('Update frontmatter fields on an existing memory note') and enumerates the exact fields modified, distinguishing it from sibling note-mutation tools like patch_note_preamble and revert_note. It does not directly name alternatives, but the field enumeration makes scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit trigger conditions ('when a fact's lifecycle changes: verified today, superseded by a newer note, or confidence raised or lowered') and a clear preference rule: prefer invalidating over deleting/rewriting, with a stated reason (history stays queryable). It also prescribes a format for the 'rejected' field. This is actionable when-to-use guidance.

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