Skip to main content
Glama

quipu_merge_apply

Destructive

Apply reviewed merge decisions to finish a share merge or fork promotion in one transaction, recording the reviewer and decisions hash while refusing undecided, stale, or invalid rows.

Instructions

WRITE. Finish a share merge (incoming + base) or a fork promotion (fork): the clean part plus every decided row in ONE transaction whose source records the reviewer and the decisions hash. Refuses and writes nothing on an undecided row, stale decisions (either side moved), more values than sh:maxCount, a value that is not an RDF term, or (forks) a SHACL refusal. Applying the same decisions again returns outcome already-applied and writes nothing.

Input Schema

NameRequiredDescriptionDefault
baseNoIts parent share. Inline, as /import takes it.
forkNoApply to this fork's promotion, instead of incoming + base.
actorNoWho is applying.
dry_runNoRun every check and report the counts it would write; write nothing.
incomingNoThe share to merge. Inline, as /import takes it.
reviewerYesWho decided. Recorded in provenance.
decisionsYesThe file from merge_decisions with each row's decision set (quipu_merge_resolve): {choose: ours|theirs|base|both} or {values: [N-Triples terms]}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.17.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare this a destructive, open-world write, so the description need not restate that. It does add genuinely new behavioral facts: atomic single-transaction semantics, provenance recording of reviewer and decisions hash, and idempotent replay returning outcome already-applied. However, it does not state permissions/auth requirements or the shape of the returned counts, which for a destructive tool leaves some transparency on the table.

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?

Front-loaded with 'WRITE.' and the transactional payload, and the second sentence packs the refusal conditions and idempotency into one line. The refusal list is dense and slightly run-on, but no sentence is filler.

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 7-parameter destructive tool with nested objects and no output schema, the description covers modes, transactionality, failure conditions, idempotency, and one return value (already-applied). Only the return payload beyond that single outcome and any authorization prerequisites remain uncovered.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema cannot: fork and incoming+base are presented as mutually exclusive application modes, decisions must come from merge_decisions/resolve, and the reviewer is bound into the decisions hash. Those are semantic constraints not expressible in the JSON schema.

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 resource ('Finish a share merge ... or a fork promotion') along with the two modes distinguished by the fork parameter, and names the upstream producers (merge_decisions, quipu_merge_resolve) whose output it consumes, so an agent can place it in the merge workflow without opening a sibling schema.

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?

The terminal position in the workflow is clear ('Finish', 'the clean part plus every decided row'), and the description enumerates exactly the states in which it will refuse rather than write, which functions as a when-not-to-call list. It does not explicitly contrast dry_run with a real apply in prose (that lives only in the schema), so it falls short of a full 5.

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

Deploy Server

Other Tools