Skip to main content
Glama

Recommend roles for tasks

recommend_roles
Read-onlyIdempotent

Recommend the built-in roles that together cover a set of admin tasks, using the RBAC Map Role Builder algorithm. Get task ids from list_tasks first. "fewest-roles" (default) picks the smallest set; "least-privilege" prefers several narrow roles over one broad one.

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

Input Schema

NameRequiredDescriptionDefault
goalNofewest-roles (default) or least-privilege.
task_idsYesTask ids from list_tasks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, and the description is consistent with that. Beyond the annotations it adds real behavior: the default goal is fewest-roles, the default picks the smallest covering set, and the alternative trades breadth for narrowness.

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?

Three compact sentences, front-loaded with what the tool does, then the prerequisite, then the mode semantics. Every sentence carries distinct information with no repetition of 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?

For a two-parameter read-only tool with no output schema, the description covers purpose, prerequisite, and mode trade-offs, and implies the return is a role set. A brief note on what the response contains (e.g., roles with coverage detail) would close the last gap.

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, but the description earns more by explaining what the enum values actually mean: fewest-roles minimizes set size whereas least-privilege prefers several narrow roles over one broad one. It also reinforces that task_ids must come from list_tasks.

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?

The description gives a specific verb (recommend) and resource (built-in roles) plus the exact scope: a set of admin tasks, computed with the RBAC Map Role Builder algorithm. An agent can distinguish this from siblings like find_roles_with_permission or compare_roles because it clearly states the output is a covering set of roles.

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?

It explicitly routes the agent through list_tasks first to obtain task ids, and explains which goal mode to pick (fewest-roles default vs least-privilege for narrow roles). It does not state when not to use it versus siblings such as compare_roles, but the prerequisite and mode guidance are strong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources