Skip to content

group_manage

← MCP reference
View in MCP reference →
TOOL group_manage

Organize rooms and device groups: create, rename, change members, enable, disable, merge or delete them.

To hide a discovered group (such as a robot's room) for good, disable it with SET_ENABLEMENT: rediscovery may recreate a deleted discovered group but never re-enables a disabled one. This tool never performs physical control; use control to act on devices.

MERGE_INTO and DELETE_GROUP are destructive: describe exactly which groups will be merged or deleted and get the user's explicit confirmation before calling, and never infer that consent from an earlier request. Read each group with group_query first and pass its current etag; a stale etag fails with PRECONDITION_FAILED, so re-read and confirm again rather than retrying blindly.

Operations in one call apply atomically: either every operation commits or none does. Set validateOnly=true to check a batch without writing. idempotencyKey (required unless validateOnly) is a fresh unique string per intended change; reuse the same key only to retry that same request after an unknown outcome, which then returns the original result.

The result is the Port OS group management envelope: status COMMITTED or FAILED, results correlated by requestId, and errors listing every failing operation with code, family and message.

Required scope

group:manage

Input

Fields

idempotencyKeystring

Unique key for this intended change, at most 255 characters. Required unless validateOnly is true.

operationsarray<EndpointGroupsManageOperation>Required

Ordered operations applied atomically.

validateOnlyboolean

Validate and authorize the batch and report what would happen without writing.

Result

Fields

statusstringRequired

Outcome of an atomic batch. `COMMITTED` means every operation was applied (or, for a validate-only request, would be applied); `FAILED` means nothing was written and `errors` lists every failing operation.

Allowed values: COMMITTED, FAILED.

resultsarray<EndpointGroupsManageResult>Required
errorsarray<BatchItemError>Required

Errors

A failed call returns this error object as its result instead.

Fields

familystringRequired

The broad class of an error. The family decides the HTTP status of a REST error, so clients can handle every code of a family alike.

codestringRequired

The specific error, one of a closed set of Port OS codes. Every REST error body, MCP tool error, batch item error and discovery item error uses this enum; each code belongs to an `ErrorFamily` that decides its HTTP status. Provider-specific codes are never codes: they travel in `details.providerCode`. New failure kinds are added here, never as free strings.

messagestringRequired

Plain-language description of the failure and the suggested next action.

detailsErrorDetails

Optional typed context for an error. Fields are additive and only populated when the error can safely expose that context to API clients.

errorsarray<SynchronizationItemError>

Every rejected item when a request that is validated item by item and applied atomically fails, such as a discovery `SynchronizationRequest` whose routes, group routes or relationships are rejected. Omitted for single-item failures.