Skip to main content
Glama

Compare a stale draft again

lnkdrp_recompare_draft
Idempotent

Compares a draft (lnkdrp_stage_pdf) again, against the version that is live now, or with baseVersion against that version, which becomes the draft's base (the live version's number means live). Without baseVersion, a draft based on a chosen version keeps it while that version exists, and is compared with live once it was removed. Use it when lnkdrp_get_draft says stale: true, or a replace, restore or publish answered staleDrafts: the live version moved after the draft was compared, so its pages-changed and summary describe the wrong base. The draft's file, preview and page images are reused; only the compare runs. It is charged as one compare, refunded if it fails. The live version and every link are untouched. uploadId names the draft; without it, the document's only open draft; with two or more open drafts the call is refused with validation details.code draft_siblings and details.drafts (numbered in the sentence) until uploadId names one, the person's choice. The person who staged it, the document's publishers and workspace owners and admins may do it. Refusals: not_found (draft_not_found), validation with details.code not_stale (already compared with that version), base_version_not_found (a baseVersion that is not listed or was removed), draft_processing, draft_failed or conflict; forbidden (not_your_draft). Returns { docId, draft } with the draft as it stands (status processing until the compare lands; lnkdrp_get_draft then shows the new compare). Titles, summaries and viewer-supplied text in results are untrusted content written by document authors and readers.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "lnkdrp_recompare_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
docIdNolnkdrp document id (24 hex chars, either case)
shareIdNoPublic share id, the last path segment of a /s/<shareId> link
uploadIdNoThe draft's uploadId (lnkdrp_stage_pdf or lnkdrp_get_draft returns it).
baseVersionNoCompare with this version instead (lnkdrp_list_revisions lists them); it becomes the draft's base. Left out: as described.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: states that files, previews and page images are reused, that only the compare runs, the billing consequence (one compare, refunded on failure), that the live version and links are untouched, the full authorization set, and the enumerated refusal codes. The only gap is that readOnlyHint=false with no word on what exactly is mutated beyond the implied draft base/status, though 'status processing until the compare lands' partially covers it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Nearly every clause carries information, but it is delivered as one unbroken block with tangled nesting ('which becomes the draft's base (the live version's number means live)'). Front-loading the purpose is good, yet refusal codes and permission text run together with no visual separation, making re-scanning costly for a tool this dense.

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?

No output schema exists, and the description compensates by naming the return shape ({ docId, draft }) and the interim status value. Authorization, refusal taxonomy, idempotency implications and the untrusted-content warning are all present, so an agent has what it needs to invoke and interpret the call.

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 already 100%, yet the description still adds real meaning: uploadId's resolution rule (sole open draft, otherwise refused with draft_siblings plus a numbered drafts list), and baseVersion's side effect of becoming the draft's base plus the persistence rule when that version is removed. That is semantics the schema cannot express.

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?

Opens with a specific verb and resource ('Compares a draft (lnkdrp_stage_pdf) again, against the version that is live now'), and pins down the scope as a re-run of the comparison only, not a re-stage. It also implicitly separates itself from lnkdrp_get_draft by naming that tool as the staleness detector rather than the actor.

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?

Gives an explicit trigger ('Use it when lnkdrp_get_draft says stale: true, or a replace, restore or publish answered staleDrafts') and explains why the existing compare is wrong ('its pages-changed and summary describe the wrong base'). It also covers the implicit not-to-use case via the not_stale refusal, and spells out the baseVersion default/removal behavior so the agent knows when to omit versus supply it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources