Skip to main content
Glama

clone_document

Duplicate an ERPNext document and optionally override selected fields to create a modified copy without re-entering data.

Instructions

Clone a document (optionally override fields)

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": {
      "doctype": "<doctype>",
      "name": "<name>"
    },
    "name": "clone_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDocument name/ID to clone
doctypeYesDocType name
overridesNoFields to override (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not disclose whether the clone is a deep copy including child tables and links, whether permissions/owners are copied, whether a new name is generated or returned, or whether the returned value is the new document identifier — all critical for a mutating tool with a nested-object parameter.

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?

A single short clause, front-loaded with the verb and resource, with no redundant wording. It is efficient, though its brevity borders on under-specification rather than optimal conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with a nested object parameter, no annotations, and no output schema, the description says too little: the return value, permissions behavior, and deep-vs-shallow copy semantics are all unaddressed. The schema documents the inputs, but the behavioral picture an agent needs before calling it is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description only restates that overrides is optional and does not add semantics such as what field paths the overrides object accepts or how it merges with cloned values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Clone a document" states a specific verb and resource, and "(optionally override fields)" adds the key differentiator from a plain copy. It does not name how it differs from siblings like create_document or update_document, but the operation itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance: nothing says to prefer clone_document over create_document plus manual field copying, nor when overrides should be supplied. The parenthetical hints that overrides are optional but gives no conditions or prerequisites (e.g., permissions needed on the source document).

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