patch_orgs_bulk
Calls PATCH /api/orgs/bulk as the signed-in person · REST reference
Apply the same field changes to several organizations
Platform staff only (there is no dedicated org-status command permission). Each id is loaded and saved independently via Promise.allSettled, so this is NOT atomic: the response reports per-id success and failure and a partial application is the normal outcome of a bad id. Only status, name, address, phone and email are copied from updates; any other key in the object is ignored silently and still echoed back under updates. Ids that do not resolve land in failed at 200 — they do not produce a 404.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
bodyJSON | object | required | The request body, as a JSON object. Its fields are listed below. |
Fields of body
| Field | Type | Description | |
|---|---|---|---|
orgIds | array of string (uuid) | required | |
updates | object | required | At least one key. Only the five allow-listed fields are applied; everything else is dropped without comment. |
updates.address | string | ||
updates.email | string (email) | ||
updates.name | string | ||
updates.phone | string | ||
updates.status | "ACTIVE" | "INACTIVE" | "SUSPENDED" |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "patch_orgs_bulk",
"arguments": {
"body": {
"orgIds": [
"11111111-1111-4111-8111-111111111111"
],
"updates": {
"address": "string",
"email": "name@example.org",
"name": "string",
"phone": "string",
"status": "ACTIVE"
}
}
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
Per-id outcome. Returned even when every id failed.
{
"failed": [
{
"error": "string",
"id": "11111111-1111-4111-8111-111111111111",
"status": 1
}
],
"message": "string",
"successful": [
"11111111-1111-4111-8111-111111111111"
],
"total": 1,
"updates": {}
}Fields
| Field | Type | Description |
|---|---|---|
failed | array of object | |
failed[].error | string | That answer's message — the DAL's own sentence for a 400/404/409, a constant otherwise; never upstream text. |
failed[].id | string (uuid) | |
failed[].status | integer | The status this id's failure would be answered with alone — 404 for no such organization, the DAL refusal's by its code, 503 when the DAL could not be reached, 500 otherwise. |
message | string | |
successful | array of string (uuid) | |
total | integer | Length of the submitted orgIds. |
updates | object | The submitted object, echoed unfiltered. |
When it fails
A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.
400orgIdsabsent/empty/not an array, orupdatesabsent/empty.403Authenticated, but the caller holds none of the required permissions.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "patch_orgs_bulk",
"description": "PATCH /api/orgs/bulk — Platform staff only (there is no dedicated org-status command permission). Each id is loaded and saved independently via `Promise.allSettled`, so this is NOT atomic: the response reports per-id success and failure and a partial application is the normal outcome of a bad id. Only `status`, `name`, `address`, `phone` and `email` are copied from `updates`; any other key in the object is ignored silently and still echoed back under `updates`. Ids that do not resolve land in `failed` at 200 — they do not produce a 404.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The JSON request body: { orgIds*: array of string; updates*: { address: string; email: string; name: string; phone: string; status: one of \"ACTIVE\" | \"INACTIVE\" | \"SUSPENDED\" } (At least one key.) }"
}
},
"required": [
"body"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false
}
}