Skip to main content
Glama

set_agent_role

Assign an agent a worker, coordinator, or admin role to control task scope and account access. Requires an admin key; sandbox agents graduate via the claim flow.

Instructions

Set an agent's role (admin key required): worker (own-task scope), coordinator (sees + can comment on all account tasks), or admin (full account management). Sandbox agents graduate via the claim flow and cannot be assigned a role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYesRole preset to apply
agent_idYesAgent ID to change

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.19.0
    • removedInput schema / properties / agent_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / agent_id / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  2. Addedv1.13.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does disclose two non-obvious behaviors: the admin-key authorization requirement and the sandbox-agent prohibition. It stops short of stating side effects such as whether the change is reversible, when it takes effect, or whether it revokes prior permissions.

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?

Two sentences, zero filler, front-loaded with the action and its authorization requirement. Every clause (role definitions, admin key, sandbox exclusion) carries distinct decision-relevant information.

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?

For a 2-parameter tool with full schema coverage and no output schema, the description covers purpose, authorization, allowed values, and an eligibility exclusion. The remaining gap is mutation semantics (effect timing, reversibility, whether a role can be downgraded), which an agent changing permissions would want.

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 100%, so the baseline is 3, and the description genuinely exceeds it by defining what each enum value means operationally (worker/coordinator/admin scopes) rather than leaving the schema's terse 'Role preset to apply'. It adds no new detail for agent_id, which the schema already documents.

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 (set an agent's role) and enumerates the three concrete values with their scope implications (worker = own-task, coordinator = sees/comments on all account tasks, admin = full account management). This is enough to distinguish it from register_agent, list_agents, and delete_agent without opening any schema.

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?

Gives a hard precondition (admin key required) and an explicit when-not with the alternative route: sandbox agents 'graduate via the claim flow and cannot be assigned a role.' It does not name sibling tools as alternatives for other cases, but the eligibility rule is concrete and actionable.

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