Skip to main content
Glama

Set lifecycle frontmatter

set_frontmatter
Destructive

Update frontmatter fields on memory notes to reflect fact lifecycle changes: verification, supersession, confidence adjustments, or invalidation while 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, 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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
indexedYes
updatedNo
rel_pathNo
replayedNo
committedNo
content_hashYes
operation_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +  }
      +]
  2. Changed1 schema field changedv0.1.11
    • addedInput schema / properties / archived
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Archived"
      +}
  3. Changed1 schema field changedv0.1.10
    • addedInput schema / properties / last_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Last Id"
      +}
  4. 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"
      +]
  5. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

While annotations declare destructiveHint:true, the description adds critical detail: it specifies exactly which fields are modified and explicitly states 'The Markdown body is preserved.' It also discloses constraints on last_id (requires expected_hash, format rules, non-decreasing counter). This goes far beyond the annotation signals and informs the agent of exactly what will change, reducing surprise.

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 description is dense but well-organized: it starts with the purpose, moves to usage guidance, then lists the fields and constraints. Every sentence carries useful information; no fluff. It could be slightly trimmed (e.g., listing fields is redundant with the schema), but the repetition aids comprehension. The front-loading is effective.

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?

Given the tool's complexity (13 parameters, destructive write), the description covers the behavioral essentials: when to use, what fields change, key constraints, and that the body is preserved. It doesn't detail return values (though an output schema exists) or enumerate all parameter formats, but it provides sufficient context for correct invocation. The description is comprehensive enough for an agent to act without additional documentation.

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

Parameters4/5

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

The input schema has 13 parameters with zero description coverage in the schema itself. The description compensates by listing the affected fields and adding semantic context for key ones: last_id constraints (expected_hash, format, monotonicity) and the rejected entry format ('option -- reason'). It doesn't explain every parameter's format (e.g., date strings), but for a write tool with this many fields, it provides enough context to make intelligent calls.

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 the tool's function: updating lifecycle frontmatter on existing memory notes, with a specific list of fields. It distinguishes itself from sibling tools like patch_note_preamble and patch_note_section by focusing on the frontmatter rather than body content. The verb 'set' and resource 'frontmatter' are explicit, making the tool's purpose immediately understandable.

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?

The description provides explicit when-to-use guidance: 'Use this when a fact's lifecycle changes' with specific scenarios (verified, superseded, confidence changes). It also offers behavioral preferences (prefer invalidation over deletion) and a clear convention for rejected entries. This gives an agent unambiguous criteria for choosing this tool over alternatives, even if sibling names aren't exhausted.

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