Skip to main content
Glama

apply_role_template

Destructive

Grant all scopes in a role template to a tenant or team in one call, simplifying permission setup. Requires an organization on Kiln Business.

Instructions

Grant every scope in a role template to a tenant or team in a single call.

Needs the organisation to be on Kiln Business.

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": {
      "org_id": "<org_id>",
      "role": "<role>",
      "granted_by": "<granted_by>"
    },
    "name": "apply_role_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYesThe role template to apply: ``"designer"``, ``"reviewer"``, ``"release-manager"`` or ``"read-only"``. Any other name is refused.
ask_idNoThe id an earlier ``APPROVAL_REQUIRED`` answer returned. Pass it on the repeat call to learn whether the person approved; omit it on the first call.
org_idYesThe org the grants are made in.
team_idNoThe team that receives the role. Give exactly one of ``tenant_id`` and ``team_id``.
tenant_idNoThe account that receives the role. Give exactly one of ``tenant_id`` and ``team_id``.
granted_byYesWho is making the grants, recorded on each one. On Kiln's hosted server it is read from the signed-in session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.5.1
    • addedInput schema / properties / ask_id
      Added value: +{
      +  "description": "The id an earlier ``APPROVAL_REQUIRED`` answer returned.  Pass it on the repeat call to learn whether the person approved; omit it on the first call.",
      +  "title": "Ask Id",
      +  "type": "string"
      +}
    • addedInput schema / properties / granted_by / description
      Added value: +"Who is making the grants, recorded on each one. On Kiln's hosted server it is read from the signed-in session."
    • addedInput schema / properties / org_id / description
      Added value: +"The org the grants are made in."
    • addedInput schema / properties / role / description
      Added value: +"The role template to apply: ``\"designer\"``, ``\"reviewer\"``, ``\"release-manager\"`` or ``\"read-only\"``.  Any other name is refused."
    • addedInput schema / properties / team_id / description
      Added value: +"The team that receives the role.  Give exactly one of ``tenant_id`` and ``team_id``."
    • addedInput schema / properties / tenant_id / description
      Added value: +"The account that receives the role.  Give exactly one of ``tenant_id`` and ``team_id``."
  2. Addedv1.5.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already flag this as a destructive, non-read-only mutation, and the description usefully adds the bulk-scope effect and the Kiln Business entitlement prerequisite. It does not disclose the APPROVAL_REQUIRED / ask_id retry flow (only visible in a parameter description) or what happens to scopes a tenant or team already holds.

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, with the action and scope front-loaded and the entitlement prerequisite trailing. Nothing is repeated from the schema or annotations.

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

Completeness3/5

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

For a destructive, approval-gated bulk-grant tool with six parameters and no output schema, the description covers the what and the plan prerequisite but omits the human-approval round trip, idempotency/overwrite behavior, and any hint about the result. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the enumerated valid role names, the tenant_id/team_id exclusivity rule, and the ask_id approval flow are already documented. The description only restates that the target is 'a tenant or team' and adds nothing beyond the schema.

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

Purpose4/5

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

States a concrete verb and resource: 'Grant every scope in a role template to a tenant or team in a single call.' The bulk nature ('every scope') implicitly contrasts with the sibling grant_scope, but it never names that sibling, so the differentiation is left to inference.

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 phrase 'in a single call' hints at when this beats repeated single-scope grants, and the Business-plan requirement is a real gating condition. However, there is no explicit 'use this instead of grant_scope when…' routing and no statement about 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.

Deploy Server

Other Tools