Skip to main content
Glama

create_delegation_grant

Create an expiring delegation grant that authorizes one workspace member to act for another with fixed capabilities for a stated purpose, then mint a short-lived delegate token.

Instructions

Create an expiring grant that lets one workspace member (the delegate) act for another (the subject) with a fixed set of capabilities, for a stated purpose. The grant is only the authority: the delegate then calls delegate_token with the returned grant id to mint a token of at most one hour that acts as the subject. revoke_delegation_grant ends a grant and list_delegation_grants lists them. Only delegatable capabilities are accepted (workspace:read, workspace:write, member:self, message:post, thread:transition, artifact:upload, search:query, event:subscribe), subject and delegate must be different live members of the workspace, and expires_at must be within the workspace's grant ceiling (90 days unless set_delegation_policy changed it). Returns the grant {id, workspace_id, subject_id, delegate_id, capabilities, purpose, authorized_by, expires_at, revoked_at, created_at} and writes an audit record. Requires token:admin.

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": {
      "workspace_id": "<workspace_id>",
      "subject_id": "<subject_id>",
      "delegate_id": "<delegate_id>",
      "capabilities": "<capabilities>",
      "purpose": "<purpose>",
      "expires_at": "<expires_at>"
    },
    "name": "create_delegation_grant"
  }
}

Input Schema

NameRequiredDescriptionDefault
purposeYesWhy the grant exists, 1 to 1000 bytes after trimming. Stored on the grant and in its audit record.
expires_atYesRFC 3339 instant when the grant ends. Must be in the future and no later than the workspace's grant ceiling allows (90 days from now by default).
subject_idYesUUID of the member the delegate will act for.
delegate_idYesUUID of the member who may act for the subject. Must differ from subject_id.
capabilitiesYesCapability names the grant carries, at least one, each from workspace:read, workspace:write, member:self, message:post, thread:transition, artifact:upload, search:query or event:subscribe. Any other name is refused.
workspace_idYesUUID of your own workspace (the workspace_id from whoami). Another workspace is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv479.0.2
    • addedInput schema / properties / capabilities / description
      Added value: +"Capability names the grant carries, at least one, each from workspace:read, workspace:write, member:self, message:post, thread:transition, artifact:upload, search:query or event:subscribe. Any other name is refused."
    • addedInput schema / properties / delegate_id / description
      Added value: +"UUID of the member who may act for the subject. Must differ from subject_id."
    • addedInput schema / properties / expires_at / description
      Added value: +"RFC 3339 instant when the grant ends. Must be in the future and no later than the workspace's grant ceiling allows (90 days from now by default)."
    • addedInput schema / properties / purpose / description
      Added value: +"Why the grant exists, 1 to 1000 bytes after trimming. Stored on the grant and in its audit record."
    • addedInput schema / properties / subject_id / description
      Added value: +"UUID of the member the delegate will act for."
    • addedInput schema / properties / workspace_id / description
      Added value: +"UUID of your own workspace (the workspace_id from whoami). Another workspace is refused."
  2. First observedv479.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false. The description goes beyond them with validation rules (only the listed capabilities are accepted, subject and delegate must differ, expires_at within the 90-day ceiling unless set_delegation_policy changed it), the token:admin requirement, and the fact that an audit record is written. However, it says nothing about the non-idempotent behavior — whether re-calling with identical inputs creates a duplicate grant — which is exactly the trait the annotations flag but cannot explain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, and the workflow sentence follows. But the remaining sentences are a dense run-on mixing workflow, lifecycle references, validation rules, return shape, and auth into one paragraph, with no visual structure. Every fact earns its place, but the packaging makes it slow to scan.

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?

There is no output schema, and the description compensates by enumerating the returned grant fields (id, workspace_id, subject_id, delegate_id, capabilities, purpose, authorized_by, expires_at, revoked_at, created_at) and noting the audit record write. An agent has the workflow, prerequisites, validation rules, and return shape needed to call this correctly on the first attempt.

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 baseline is 3. The description mostly restates schema facts: the capability list, the expiry ceiling, and the workspace_id meaning are all already documented per-parameter. It does add value for cross-field constraints ('subject and delegate must be different live members') that no single schema property carries.

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 ('Create an expiring grant') plus the exact semantic scope: a delegate acting for a subject with fixed capabilities. It explicitly differentiates the grant from its sibling delegate_token ('the grant is only the authority'), and names revoke_delegation_grant and list_delegation_grants as the lifecycle partners.

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?

Gives the full two-step workflow: create the grant here, then call delegate_token with the returned grant id to mint a token. It names the alternatives (delegate_token, revoke_delegation_grant, list_delegation_grants) and the constraints that determine whether to call this at all (delegatable capability set, distinct live members, expiry ceiling, token:admin).

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