Skip to main content
Glama

Find roles that grant a permission

find_roles_with_permission
Read-onlyIdempotent

Reverse lookup: which roles grant a permission, least-privileged first. For Azure, pass an operation such as "Microsoft.Storage/storageAccounts/listKeys/action" (wildcards and notActions are applied) or a pattern such as "Microsoft.KeyVault/*". For Microsoft 365, pass keywords such as "reset password"; they are matched against RBAC Map's plain-language permission descriptions.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results (default 15, max 50).
serviceNoLimit to one service, e.g. "entra" or "azure".
permissionYesAzure operation or pattern, or Microsoft 365 keywords.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed world), yet the description adds genuine behavior: results are ordered least-privileged first, wildcards and notActions are applied during matching, and M365 input is matched against plain-language descriptions rather than raw strings. It stops short of describing the shape of each returned role, which is the one remaining behavioral gap.

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 sentences, zero waste, and the reverse-lookup definition plus ordering is front-loaded before the input-format details. Each sentence carries distinct 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?

No output schema exists, and the description does not say what a result row contains (role name, id, scope, matching permission), which leaves a small gap. Everything needed to construct a correct call — input formats per cloud, matching semantics, ordering, result cap — is present.

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?

With 100% schema description coverage the baseline is 3, and the description earns more: it gives a concrete Azure operation example ('Microsoft.Storage/storageAccounts/listKeys/action'), shows a wildcard pattern form ('Microsoft.KeyVault/*'), and explains the matching rules for the non-structural M365 keyword mode. The 'least-privileged first' ordering also implicitly relates to the limit parameter.

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 operation — a reverse lookup from permission to the roles that grant it — plus a defined result ordering (least-privileged first). The 'reverse' framing inherently separates it from forward-looking siblings like search_roles/get_role without needing to name them.

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

Usage Guidelines3/5

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

The input recipes ('for Azure, pass an operation...', 'for Microsoft 365, pass keywords') implicitly tell the agent when this tool applies, but there is no explicit selection guidance against alternatives such as search_roles or get_role, and no statement of when not to use it.

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