Skip to main content
Glama
chacharin

mcp-lightrag

by chacharin

repair_source_conflict

Resolve source-name conflicts by designating one document as primary after a dry-run preview. Commit marks other candidates as duplicates without deleting content.

Instructions

Resolve a source-name conflict (from list_source_conflicts) by naming one document as the primary. Always dry_run first to see what would change; committing (dry_run=false) marks the other candidates as duplicates -- their content is not deleted, but this still cannot be trivially undone, so double-check the dry-run result first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoTrue (the default): report only, changes nothing, and returns the candidate_count/fingerprint pair to echo back for the real commit. False: commit the repair -- requires expected_candidate_count and expected_candidate_fingerprint from a prior dry-run, and fails if the candidate set changed since then.
primary_doc_idYesDocument ID from that conflict's sample_doc_ids to keep as the single primary.
canonical_source_keyYesThe conflict's canonical_source_key, from list_source_conflicts.
expected_candidate_countNocandidate_count echoed from the dry-run. Required when dry_run is false.
expected_candidate_fingerprintNofingerprint echoed from the dry-run. Required when dry_run is false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations exist, so description carries the burden. It discloses the mutation is not trivially undone, clarifies content is not deleted, and describes the dry-run/commit safety check. It doesn't state permissions/auth needs, but for a tool whose main risk is irreversible metadata change, the disclosure is strong.

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?

Three sentences, front-loaded with the core purpose, then safety caveat and operational instruction. No filler. Every clause earns its place.

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?

Given the 5-parameter schema with full field descriptions and an output schema, the description covers the key operational guidance: source of inputs, dry-run discipline, and irreversibility. It could mention failure modes or permission requirements, but those are not essential for an agent to invoke correctly given schema hints.

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 baseline is 3. Description adds value by tying canonical_source_key and primary_doc_id to the list_source_conflicts output fields and by explaining the required dry-run-echo flow for expected_candidate_count/fingerprint. It doesn't describe the output schema, but output schema exists, so that's fine.

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?

Description states a specific verb+resource ('Resolve a source-name conflict') and names where the conflict comes from (list_source_conflicts). It also distinguishes the action from siblings like merge_entities or delete_documents by defining the conflict domain precisely, so an agent can tell this is the repair action for source-name collisions.

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?

Description explicitly instructs to dry-run first before committing, warns that committing marks candidates as duplicates and cannot be trivially undone, and tells the agent to double-check the dry-run result. It also implicitly separates dry-run and commit flows, with schema enforcing expected_candidate_count/fingerprint on commit.

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