Skip to main content
Glama

Patch note section

patch_note_section
Destructive

Replace outdated content under an existing Markdown heading while preserving the heading and surrounding sections. Uses a hash check to prevent conflicts and stores prior versions for safe atomic updates.

Instructions

Use this to rewrite an outdated section in place when the topic already has a note. Replace the content under one existing Markdown heading. Pass the note's current content_hash as expected_hash for CAS. The operation preserves the heading line and non-target sections, stores exact prior history, and writes atomically. It refuses a level-1 heading that contains subsections; patch a lower-level heading instead. For duplicate titles, pass 1-based heading_occurrence with heading_level and the exact expected_hash; the ordinal follows document order for those hashed bytes. Do not use chunk_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headingYes
rel_pathYes
request_idNo
new_contentYes
expected_hashNo
heading_levelNo
heading_occurrenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexedYes
patchedNo
rel_pathNo
replayedNo
committedNo
content_hashYes
operation_idNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 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"
      +}
    • removedOutput schema / properties / patched / $ref
      Removed value: -"#/$defs/PatchedSectionOutput"
    • addedOutput schema / properties / patched / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/PatchedSectionOutput"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / patched / default
      Added value: +null
    • 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"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "patched",
      -  "content_hash",
      -  "indexed"
      -]New value: +[
      +  "content_hash",
      +  "indexed"
      +]
  2. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / heading_occurrence
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Heading Occurrence"
      +}
    • addedOutput schema / $defs / PatchedSectionOutput / properties / heading_occurrence
      Added value: +{
      +  "title": "Heading Occurrence",
      +  "type": "integer"
      +}
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Even though destructiveHint=true already signals mutation, the description goes further: it states the operation preserves the heading line and non-target sections, stores exact prior history, writes atomically, and enforces CAS via expected_hash. It also documents the duplicate-title ordinal behavior. No statement contradicts the annotations.

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 explanation is dense and mostly front-loaded, with each sentence contributing operational detail. The 'Do not use chunk_id' sentence is out of place because that parameter does not appear in the schema, adding slight noise.

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 destructive, CAS-guarded patch operation this is close to complete: it covers target selection, duplicate resolution, atomicity, history, and a key refusal case. It does not state failure behavior when expected_hash mismatches or when expected_hash is omitted, but the output schema helps fill in return expectations.

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?

With no schema-level property descriptions, the description carries the burden and does explain the non-obvious parameters: expected_hash for CAS, and heading_level/heading_occurrence for duplicate titles. However, rel_path and request_id are left implicit, and it even mentions a chunk_id that is not present in the 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?

The description uses a specific verb and resource ('rewrite an outdated section in place', 'Replace the content under one existing Markdown heading'), so an agent knows what operation is performed. It does not explicitly name sibling tools such as patch_note_preamble or append_journal, so differentiation relies on the section/heading framing rather than an explicit contrast.

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

Usage Guidelines4/5

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

It gives a clear trigger ('when the topic already has a note') and a conditional instruction ('It refuses a level-1 heading that contains subsections; patch a lower-level heading instead'). It does not name alternative tools for creating a new note or patching the preamble, so exclusions are implicit rather than explicit.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VBlackJack/Datacron'

If you have feedback or need assistance with the MCP directory API, please join our Discord server