Skip to main content
Glama

upsert_device_group

Create or update a device group used in policy source predicates to control access by device membership. Returns a change_id; nothing applies until apply_change.

Instructions

Create or update a device group. Device groups are used in policy source predicates to control access by device membership. Returns a change_id; nothing changes until apply_change.

Args: name: Human-readable group name. group_id: UUID to update an existing group; omit to create. description: Optional group description.

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": {
      "name": "<name>"
    },
    "name": "upsert_device_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
group_idNo
descriptionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does the most important part well: it discloses the deferred-apply model ("Returns a change_id; nothing changes until apply_change"), which is non-obvious and materially changes how an agent sequences calls. Gaps remain around what happens on conflicting or malformed input (e.g. an unknown group_id) and whether name must be unique, but the critical behavioral trait is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose, then the critical change_id/apply_change caveat, then a compact Args block. Sentences are tight and each carries information; the only minor slack is the somewhat redundant "Human-readable group name" phrasing and the Args list format that partially duplicates the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the change_id return value need not be explained beyond the workflow implication it already states. For a three-parameter, unannotated mutation tool the description covers purpose, the create/update switch, the staged-apply model, and every parameter. Remaining gaps (permissions, upsert conflict semantics for optional fields) are secondary rather than blocking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it documents all three parameters with meaning rather than restating types: name is human-readable, group_id is a UUID that selects update versus create, description is optional. It still leaves open whether omitting description on an update preserves or clears the existing value, which is a real ambiguity for an upsert.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb pair and resource: "Create or update a device group," and immediately explains the domain purpose (policy source predicates controlling access by device membership). That distinguishes it in substance from delete_device_group, get_device_group and the various upsert_* siblings, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear operational routing is given: supply group_id to update an existing group, omit it to create a new one, which is the one decision an agent must make. It also flags the prerequisite workflow by stating nothing changes until apply_change is called, so the agent knows this is a staged mutation. It does not discuss when to prefer this over, say, creating via another path, but the create/update split is the meaningful guidance here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.