ms_create_purchaseorder
Create a draft purchase order without posting or moving stock; confirm_write and write access are required, and posting is separate.
Instructions
Create a purchase order as a DRAFT (applicable=false — not posted, moves nothing). WRITE — requires confirm_write=true. Posting is separate (ms_post_document). Writes also require MOYSKLAD_ALLOW_WRITE=1 (off by default).
Args: same as ms_build_purchaseorder, plus confirm_write. Returns the created document envelope {"ok": true, "data": {... "id" ...}}, or the guard/gate error (nothing sent).
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": {
"agent": "<agent>"
},
"name": "ms_create_purchaseorder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| agent | Yes | ||
| store | No | ||
| moment | No | ||
| positions | No | ||
| description | No | ||
| organization | No | ||
| confirm_write | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |