Skip to main content
Glama

create_smart_client_script

Creates ERPNext client scripts through the legacy smart-script workflow; use create_client_script with mode='smart' for current use.

Instructions

[DEPRECATED] Use create_client_script with mode='smart' instead – kept for backward compatibility

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": {
      "script": "<script>",
      "dt": "<dt>"
    },
    "name": "create_smart_client_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
dtYesTarget DocType
nameNoScript name (optional, auto-generated if not provided)
viewNoView (Form/List, optional)
scriptYesJavaScript code for the client script
enabledNoEnabled (1/0, optional, defaults to 1)
script_typeNoScript type (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose the most consequential trait — deprecation and the migration path. It does not disclose that this is a mutating write operation, what permissions it needs, or what happens to the created script, which leaves meaningful gaps for a creation tool.

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?

A single sentence with the deprecation flag bracketed and front-loaded, followed immediately by the actionable replacement. No wasted words; the agent learns the key fact in the first token.

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

Completeness3/5

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

For a deprecated shim with full schema coverage and no output schema, the description does the minimum an agent needs — avoid it, use the successor. It omits what the tool actually produces and whether existing scripts created through it behave identically to those from the replacement, which matters for a backward-compatibility path.

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%, with all six parameters documented in the schema including two enums, so the description need not restate them. It adds no parameter meaning of its own — notably it does not map the successor's mode='smart' onto any field here, so an agent migrating calls gets no field-level guidance.

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

Purpose3/5

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

The description never states what the tool does — that it creates a client script — leaving the verb+resource to be inferred from the name and from the named replacement. What it does state clearly is its lifecycle status (deprecated) and its successor, which is useful but is not a purpose statement.

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?

Explicit routing: 'Use create_client_script with mode='smart' instead – kept for backward compatibility' tells the agent which sibling to prefer and why this one still exists. It stops short of saying whether this tool should ever be called (e.g., only for legacy callers or only when mode is unavailable), so it is not a full when/when-not rule.

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