Skip to main content
Glama

Delete Role

delete_role
Destructive

Permanently delete an access role, addressed by its key (or id) from list_roles. THIS IS IRREVERSIBLE. People who hold the role are NOT moved to another one — reassign them first with update_user, or they are left holding a role that no longer exists. Flag rules and app code that check the role key stop matching anyone. The default role and the OWNER role cannot be deleted: to delete the current default, make another role the default with set_default_role first. Requires confirmation: pass confirm set to the exact role key, and only after the user has explicitly asked for the deletion — do not supply it on your own initiative. dryRun: true previews it first — the role and the privileges it grants — without deleting anything or needing confirm. Fails with ROLE_NOT_FOUND when nothing matches. Same as bridge role delete. What a role can do is only the app's default setup until you have read it here. Control access with a flag rule on a privilege (preferred) or on the role key, never with a hard-coded role check in app code. A privilege rule matches the whole key: privileges contains "REPORTS_VIEW" does not match REPORTS_VIEW_ALL. Before writing app code that consumes this, call get_integration_guide with topic=team and the framework the app uses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoRole id from list_roles, instead of key.
appNoId of the Bridge app to act on for this call (see list_apps). Omit to use the current app.
keyNoRole KEY from list_roles, e.g. "EDITOR". Pass this or id, not both.
dryRunNotrue previews what the deletion would affect and deletes nothing — no confirm needed. Do this first and show the user the result. Needs the same privilege as the deletion itself.
confirmNoRepeat the exact key of the resource being deleted, as confirmation. Required to delete; not needed with dryRun. This is a deliberate safety step — do NOT guess it or copy it from a fuzzy match. If you are not certain, list the resources first and ask the user which one they mean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds critical non-obvious behavior: irreversibility, that holders are NOT migrated, that flag rules and app code checking the key silently stop matching, the confirm gating requirement, and the ROLE_NOT_FOUND failure mode.

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?

The destructive warning and confirm requirement are front-loaded, which is correct. The trailing guidance on privilege-rule matching, app-code patterns, and get_integration_guide is tangentially related to a delete operation and adds length, though it is well-disclosed.

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

Completeness5/5

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

With no output schema, five optional params, and a high-risk mutation, the description supplies everything needed: side effects, prerequisites, confirmation protocol, dry-run behavior, and error semantics. An agent can call this correctly without further context.

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 adds semantic nuance beyond the schema — that confirm must reflect an explicit user request rather than agent initiative, and that dryRun needs no confirm. It does not add much on id/key/app beyond what the schema states.

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 (permanently delete an access role) and clarifies the addressing mode (key or id from list_roles). It is immediately distinguishable from siblings like create_role, update_role, delete_privilege, and list_roles.

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

Usage Guidelines5/5

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

Explicitly covers when-not (default and OWNER roles cannot be deleted; make another default with set_default_role first), prerequisite work (reassign holders with update_user), and the recommended dryRun-first workflow. Alternatives and preconditions are named, not implied.

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.