Skip to main content
Glama

conflicts_resolve

Resolve an unresolved sync conflict by choosing a deterministic strategy: keep-server, keep-mine, keep-both, or merged content. Updates the local file and may queue an outbound sync operation.

Instructions

Resolve one sync conflict using one of 4 deterministic strategies (spec 1.7). strategy: 'keep-server' = accept the remote version, overwrite the canonical file, delete the conflict copy. 'keep-mine' = keep the local version, re-assert it to the server (version bump + outbox op), delete the conflict copy. 'keep-both' = keep the canonical file AND permanently retain the conflict copy as its own newly-tracked file (no outbox op is dropped; the copy is registered with a fresh gid). 'merged' = use your own mergedContent (REQUIRED for this strategy) as the new canonical content, push it, delete the conflict copy. Only acts on an UNRESOLVED conflict for the gid; if none exists it is an error. Returns {success, gid, strategy, resolvedAt, outboxOpId?, newFileGid?}. This is a write operation: it mutates the local file and may enqueue an outbound op for sync.

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": {
      "gid": "<gid>",
      "strategy": "<strategy>"
    },
    "name": "conflicts_resolve"
  }
}

Input Schema

NameRequiredDescriptionDefault
gidYesGlobal ID of the conflict to resolve, e.g. '104@4f9e1a8b3c7d2e0f' (as returned by conflicts_list).
strategyYesResolution strategy. See tool description for each behavior.
mergedContentNoREQUIRED when strategy='merged': the full merged file content to write as the new canonical version. Ignored for all other strategies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv7.2.2

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses per-strategy side effects (overwriting the canonical file, deleting the conflict copy, version bump plus outbox op, registering the copy with a fresh gid), states that it mutates the local file and may enqueue an outbound sync op, and names the returned fields.

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?

Purpose is front-loaded in the first clause, and every subsequent sentence adds distinct information about a strategy or the write semantics. It is dense as a single paragraph rather than bulleted per strategy, which slightly hurts scannability but wastes no content.

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 mutation tool with three parameters and no output schema, the description covers inputs, preconditions, mutation side effects, and the return shape — everything an agent needs to call it correctly and predict consequences.

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

Parameters5/5

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

Schema coverage is 100% (baseline 3), and the description goes well beyond it by defining each enum value's precise consequence and by reinforcing that mergedContent is required for 'merged' and ignored otherwise. The strategy schema field even defers to the tool description, making this text load-bearing.

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 ('Resolve one sync conflict') and immediately enumerates the four deterministic strategies, so the scope is unambiguous. The agent can distinguish this from conflicts_list/conflicts_get because the description frames it as the resolution step for a single conflict.

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?

Gives a clear precondition — it only acts on an UNRESOLVED conflict for the given gid, and errors otherwise — which tells the agent when the call is valid. It does not explicitly route to siblings (e.g. list first to obtain a gid), so guidance is strong but not exhaustive.

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