create_document
Create a new ERPNext document for any DocType with smart validation and enhanced error handling, or use standard legacy mode for direct creation.
Instructions
Create a new document in ERPNext
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>",
"data": "<data>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Document data | |
| mode | No | Creation mode: 'smart' (default) or 'standard' (legacy). Smart mode performs validation & enhanced error handling. | smart |
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) |