Skip to main content
Glama

patch_memory_section

Update a specific Markdown section in a BoteX memory note without altering frontmatter, other sections, or the Timeline audit trail; optionally append content to preserve existing text.

Instructions

Surgically updates a Markdown section (e.g. '## Compiled Truth') in a memory note
without modifying frontmatter, other sections, or the Timeline audit trail.

Args:
    memory_id: Target memory ID to patch.
    section: Section heading to replace or create (default 'Compiled Truth').
    new_content: New Markdown text for the section.
    workspace_dir: Workspace root directory.
    scope: Lookup scope ('local' or 'global').
    append: Whether to append to existing section content instead of replacing.

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": {
      "memory_id": "<memory_id>"
    },
    "name": "patch_memory_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNolocal
appendNo
sectionNoCompiled Truth
memory_idYes
new_contentNo
workspace_dirNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.2

TDQS

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does disclose the key behavioral trait: it preserves frontmatter, other sections, and the Timeline audit trail. It also explains replace-vs-append and that a missing section is created. It does not cover failure modes (e.g. unknown memory_id) or permission requirements.

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

Conciseness5/5

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

The destructive-scope caveat is front-loaded in the opening sentence, and the Args list is terse with each entry earning its place by adding meaning the schema titles lack. No redundant restatement of the tool name or padding.

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?

An output schema exists, so return values need not be described. For a 6-parameter mutation tool with no annotations, the description covers all parameters and the core preservation guarantee; only error/edge-case behavior is missing.

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?

Schema description coverage is 0%, so the Args block is doing real work: it clarifies section default ('Compiled Truth'), the local/global scope values (which are not enums in the schema), and that append means add-to rather than replace. workspace_dir and memory_id remain somewhat thin, keeping this below a 5.

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 names a specific verb and resource ('surgically updates a Markdown section in a memory note') and bounds the operation by stating what is left untouched (frontmatter, other sections, Timeline audit trail). It is clear enough to distinguish from save_memory/read_memory, though it never names a sibling explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the surgical scope and the 'append' flag, but there is no explicit statement of when to prefer this over save_memory or when not to use it. The agent must infer that this is the targeted-edit path versus a full rewrite.

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