Skip to main content
Glama

memshelf_resolve

Idempotent

Resolve memory shelf conflicts from parallel branches: union derived rows, rebuild INDEX, run diagnostics. Episode conflicts are reported, never auto-merged.

Instructions

Settle the two-writers-on-parallel-branches conflict: union derived rows, rebuild INDEX, run doctor. Episode conflicts are reported, never auto-merged; safe outside a conflict too.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • addedInput schema / $defs / ResolveInput / additionalProperties
      Added value: +false
    • addedInput schema / $defs / ResolveInput / properties / shelf_path / default
      Added value: +""
    • changedInput schema / $defs / ResolveInput / properties / shelf_path / description
      Previous value: -"Path to an initialized memory shelf."New value: +"Path to an initialized memory shelf. Optional: when omitted, the shelf named by $MEMSHELF_SHELF_PATH is used. Pass it explicitly to address a different shelf than that default."
    • removedInput schema / $defs / ResolveInput / required
      Removed value: -[
      -  "shelf_path"
      -]
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-readonly, idempotent, non-destructive behavior, but the description goes further: it discloses that derived rows are unioned (no loss), that INDEX is rebuilt and doctor is run as side effects, and that episode conflicts are reported rather than auto-merged. This clarifies the limits of automated resolution beyond what the hints convey, though auth/permission requirements are unstated.

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?

Three dense sentences with the core purpose front-loaded and no filler; each clause carries information about behavior or scope. The structure is terse but readable, though the compound second clause packs several operations together.

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?

With an output schema present, return values need not be explained, and the description covers the mutation's side effects, conflict semantics, and safety conditions. The only real gap is parameter-level guidance (commit/shelf_path), which is left entirely to the nested schema.

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

Parameters2/5

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

The description never mentions the commit flag or shelf_path, and notably omits the staged-vs-committed distinction that the commit parameter controls. The reported schema description coverage is 0% for the top-level parameter, so the description is expected to compensate for parameter behavior and does not.

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?

States a specific verb and scenario ("Settle the two-writers-on-parallel-branches conflict") and enumerates the concrete operation steps it performs: union derived rows, rebuild INDEX, run doctor. It also implicitly distinguishes itself from siblings like memshelf_index and memshelf_doctor by showing those are internal sub-steps of resolve rather than separate calls.

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?

Names the triggering situation (two writers on parallel branches) and adds "safe outside a conflict too," which tells the agent the tool is not restricted to conflict state. It does not explicitly name alternatives or exclusions, but the usage context is clear enough to route correctly.

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