Add DocType Field
add_doctype_fieldAdd custom fields to existing ERPNext DocTypes. Specify field name, type, label, and options to extend forms with new data fields.
Instructions
Add a custom field to an existing DocType
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>",
"fieldname": "<fieldname>",
"fieldtype": "<fieldtype>",
"label": "<label>"
},
"name": "add_doctype_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reqd | No | Required (0 or 1) | |
| label | Yes | Field label | |
| doctype | Yes | Target DocType | |
| options | No | Options (for Link: DocType name, for Select: newline-separated values) | |
| fieldname | Yes | Field name (snake_case) | |
| fieldtype | Yes | Field type (Data, Link, Select, etc.) | |
| description | No | Help text | |
| insert_after | No | Insert after this field |