Skip to main content
Glama

create_workflow

Create a new ERPNext workflow with states and transitions, using standard mode or smart mode with validation for reliable setup.

Instructions

Create a new Workflow in ERPNext (unified – use mode = 'standard' | 'smart')

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": {
      "document_type": "<document_type>",
      "workflow_name": "<workflow_name>",
      "states": "<states>",
      "transitions": "<transitions>"
    },
    "name": "create_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoCreation mode: 'smart' (default) or 'standard' (legacy). Smart mode performs validation.smart
statesYesStates
is_activeNoWhether workflow is active (1/0, optional, defaults to 1)
transitionsYesTransitions
document_typeYesTarget DocType
workflow_nameYesWorkflow name
send_email_alertNoSend email alerts on state changes (1/0, 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, and it discloses almost nothing. It never mentions that this is a mutating operation with persistent side effects, whether it requires administrator permissions, what happens if a workflow already exists for the DocType, what 'smart validation' rejects, or that send_email_alert can trigger outbound mail.

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 sentence with the action front-loaded and the mode hint in a trailing parenthetical; nothing is padding. It is efficient but verges on under-specified rather than merely terse, since the same sentence count could have carried prerequisite information.

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 seven-parameter mutation tool with four required parameters, no annotations, and no output schema, the description is too thin. Most critically, `states` and `transitions` are arrays of untyped objects whose expected fields are explained nowhere — neither in the schema nor in the description — leaving an agent unable to construct a call correctly.

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 schema already defines all seven parameters including the mode enum and its default. The description only echoes the mode choice and adds no semantics for the required states/transitions arrays, whose item objects have no documented shape.

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?

The description gives a specific verb and resource ("Create a new Workflow in ERPNext") and frames itself as a unified entry point covering both modes. It stops short of naming the sibling create_smart_workflow that it presumably supersedes, so an agent must infer the relationship from the word "unified" rather than being told.

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?

The only guidance is a parenthetical pointing at the `mode` parameter, which is already documented in the schema; it hints that 'standard' is legacy but never says when to pick which. There is no statement of prerequisites (a valid document_type, well-formed states/transitions) and no routing advice versus create_smart_workflow or validate_workflow.

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