Skip to main content
Glama

assign_device

Assign or reassign a device to a user, or omit the user to unassign it; changes are staged and require apply_change to take effect.

Instructions

Assign or reassign a device to a user. This normally happens at authentication time, but admins can override it here. Controllers are refused. Returns a change_id; nothing changes until apply_change.

Args: device_id: The device to assign. user_id: The user UUID to assign to. Omit to unassign.

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

Input Schema

NameRequiredDescriptionDefault
user_idNo
device_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/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 well: it discloses the two-phase commit model (returns a change_id, nothing changes until apply_change), a refusal case (controllers), and the unassign behavior when user_id is omitted. It stops short of stating required permissions or what happens to a device's prior user.

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

Conciseness5/5

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

Front-loaded with the purpose and the key behavioral caveats, then a compact Args block. No filler sentences; the two-phase-commit warning is placed where an agent will read it before acting.

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 return values need not be explained, yet the description still clarifies change_id's role. The main residual gaps for a mutation tool are permission requirements and the state of a device's previous assignment.

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 coverage is 0%, so the description must compensate, and it does for the most consequential detail: omitting user_id unassigns the device. It also identifies user_id as a UUID, though device_id is only glossed as 'The device to assign' with no indication of accepted identifier format.

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

Purpose5/5

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

States a specific verb and resource — 'Assign or reassign a device to a user' — and adds a scope nuance (reassign) plus an edge case (controllers are refused). It also names apply_change as the required follow-up, which separates it from mutation siblings that act immediately.

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?

Explains the normal context (this happens automatically at authentication time) and the exception where an admin calls it directly. It flags that nothing takes effect until apply_change and that controllers are refused, which is real when/when-not guidance, though it does not contrast with siblings like delete_device or upsert_device_group.

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