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
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | Yes | Why the grant exists, 1 to 1000 bytes after trimming. Stored on the grant and in its audit record. | |
| expires_at | Yes | 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). | |
| subject_id | Yes | UUID of the member the delegate will act for. | |
| delegate_id | Yes | UUID of the member who may act for the subject. Must differ from subject_id. | |
| capabilities | Yes | 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. | |
| workspace_id | Yes | UUID of your own workspace (the workspace_id from whoami). Another workspace is refused. |