Skip to main content
Glama

Patch workfile memory

project_memory_patch
Idempotent

Patch a durable memory record by applying field changes and body replace, using optimistic concurrency to reject mismatched revisions and prevent concurrent overwrites.

Instructions

Patch a durable memory record using optimistic concurrency. To retire one in favour of another use project_memory_supersede, which updates both sides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMemory record to patch: LRN-, ADR-, INC-, CONV- or CTX-.
changesYesFrontmatter fields to overwrite — status, tags, related, owners and the collection-specific fields — plus body to replace the Markdown. Only the keys present are touched.
expectedRevisionNoRevision string from an earlier read of this record. The write is refused if it no longer matches, so a concurrent edit is reported rather than overwritten. Omit to skip the check.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordYesA canonical record with its body, revision and reference graph.
Behavior4/5

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

The description explains the optimistic concurrency mechanism (write refused if expectedRevision no longer matches, concurrent edit reported rather than overwritten), which adds meaningful behavioral context beyond the annotations. While annotations declare idempotentHint=true and readOnlyHint=false, the description's explanation of the revision-refusal behavior adds genuine value. It could note the destructive nature of body replacement more explicitly, but the 'only keys present are touched' qualifier helps.

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?

Two sentences, zero waste. The first sentence states the core action with the concurrency qualifier, and the second gives a precise pointer to an alternative. Every word earns its place.

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

Completeness5/5

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

For a memory-record patching tool with 100% schema description coverage, a rich output schema, and detailed per-parameter documentation, the description is complete. It covers the action, the concurrency behavior, the partial-update semantics (delegated to schema), and the sibling distinction. The schema already explains expectedRevision and changes thoroughly, and the description adds the retire-orientation.

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 100% and each parameter already has detailed descriptions in the schema, including the revision string's purpose, the id prefix pattern, and the changes semantics with partial-update behavior. The description's main contribution is naming the retire flow via supersede, which reinforces schema content but doesn't add substantial new parameter semantics beyond what's already documented.

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 patches a durable memory record using optimistic concurrency, with a specific verb (patch) and resource (durable memory record). It explicitly distinguishes itself from the sibling project_memory_supersede, naming the alternative and explaining the difference (retirement updates both sides).

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 explicitly says when NOT to use this tool: for retiring a record in favour of another, pointing to project_memory_supersede as the alternative. This is direct when/when-not guidance with a named sibling tool, exactly the highest tier of usage guidance.

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

Install Server

Other Tools

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/illodev/workfile'

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