Publish items
Publish Ready items to the connected accounting software.
MCP tool dext_write → publish_items
write Confirm
Sends the extracted data and the document image of each item to its destination, where it appears within a few seconds. Only Ready items publish; others come back with the missing field. Needs the Admin role or publishing permission. Dext archives published items by default. Failed items return the publishing error. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| item_ids string[] required | string[] | Item IDs from list_items. |
| publish_to string | string | Destination. Default: the item's Publish to. |
| publish_as string | string | Xero only: the status to publish as, one of those Dext offers. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "dext_write",
"arguments": {
"operation": "publish_items",
"arguments": {
"item_ids": [
"it_7f3a11",
"it_7f3a12"
],
"publish_to": "Xero",
"publish_as": "draft"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"published": [
{
"item_id": "it_7f3a11",
"publish_to": "Xero",
"publish_as": "draft"
}
],
"failed": [],
"skipped": [
{
"item_id": "it_7f3a10",
"reason": "missing category"
}
]
},
"isError": false
}