Skip to main content
Glama

Set lifecycle frontmatter

set_frontmatter
Destructive

Update an existing memory note's frontmatter to track verification, confidence, invalidation, supersession, rejected options, and archiving without changing 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, archived, 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

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

Output Schema

NameRequiredDescriptionDefault
indexedYes
updatedNo
rel_pathNo
replayedNo
committedNo
content_hashYes
operation_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.17
    • addedOutput schema / description
      Added value: +"Successful ``set_frontmatter`` payload."
    • removedOutput schema / properties / committed / default
      Removed value: -null
    • removedOutput schema / properties / operation_id / default
      Removed value: -null
    • removedOutput schema / properties / rel_path / default
      Removed value: -null
    • removedOutput schema / properties / replayed / default
      Removed value: -null
    • removedOutput schema / properties / updated / default
      Removed value: -null
  2. Changed2 schema fields changedv0.1.13
    • changedInput schema / properties / confidence / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "high",
      +      "medium",
      +      "low",
      +      "needs_verification"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / origin / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "ai",
      +      "human",
      +      "merged"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changedv0.1.11
    • addedInput schema / properties / archived
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Archived"
      +}
  4. Changed1 schema field changedv0.1.10
    • addedInput schema / properties / last_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Last Id"
      +}
  5. 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"
      +]
  6. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Although annotations already declare destructiveHint=true and readOnlyHint=false, the description adds field-level scope (the exact list of frontmatter keys mutated plus the automatic updated timestamp), the guarantee that the body is preserved, and the constraint that last_id requires expected_hash and cannot decrease an existing valid counter — all behavior beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The sentences themselves are dense and earn their place, but the structure is back-loaded: the actual purpose ('Update frontmatter fields on an existing memory note') appears as the fourth sentence, after usage guidance, so an agent scanning for what the tool does hits examples before the verb. The 'only changes ...' enumeration is long but defensible.

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 13-parameter mutation with an output schema (so return values need not be described) and annotations covering the safety profile, the description covers the critical behavior: mutation scope, body preservation, and the last_id/expected_hash invariant. It is only slightly short on identity/path parameters (rel_path, request_id) and conflict reporting.

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% across 13 parameters, so the description must carry the load. It provides real meaning for the tricky ones (last_id format and monotonicity, expected_hash coupling, rejected 'option -- reason' format) and enumerates the mutable fields, but gives no semantics for rel_path, origin, request_id, archived, valid_from/invalid_at/invalidated_by beyond their names.

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 states a specific verb+resource: 'Update frontmatter fields on an existing memory note,' and immediately scopes it by declaring 'The Markdown body is preserved,' which cleanly separates it from the sibling body-editing tools (patch_note_section, patch_note_preamble). An agent can tell what class of operation this is without opening the schema.

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?

It gives explicit triggering conditions ('when a fact's lifecycle changes: verified today, superseded by a newer note, or confidence raised or lowered') and an explicit preference over an alternative action ('Prefer invalidating an outdated fact... over deleting or rewriting it'), plus a convention for the rejected field so a future agent does not re-propose discarded options.

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