Skip to main content
Glama

create_delegation

Create a delegation (Proof of Delegation): a control-proven domain authorizes a typed url/purl artifact and receives a publishable signed token. The attestation is that the domain's controller authorized this artifact — nothing more; it says nothing about the artifact or the business behind it. Each mint is a billable proof. A requested lifetime longer than the control proof's remainder is rejected, never truncated. The result carries the publishable token AND the DERIVED effective_status/is_valid — the same pair the list and get tools return, so the shape does not depend on which verb produced it.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.

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": {
      "control_proof": "<control_proof>",
      "delegate": "<delegate>"
    },
    "name": "create_delegation"
  }
}

Input Schema

NameRequiredDescriptionDefault
delegateYesThe typed artifact being authorized
expires_inNoLifetime in seconds (must not exceed the control proof's remainder)
control_proofYesPublic handle (ph_ctl_<32 hex>) of YOUR active domain control proof

Output Schema

NameRequiredDescriptionDefault
idNoMongoDB ObjectId
scopeNoDeprecated. Delegation schema 2.0 carries no scope; this array stays for the SDKs released before it: the scope a delegation issued before schema 2.0 was stored with, otherwise empty. Removed in the next major version.
tokenNoThe signed delegation JWT — the PUBLISHABLE artifact (publish it in your MCP server card under `_meta` → `holdings.proof/delegation`). Same key, algorithm and JWKS as proof tokens
statusNoThe owner's OWN record — whether they revoked this delegation themselves. Nothing else writes it: neither the control proof dying nor this delegation's own lifetime running out. Liveness is DERIVED and reported separately as `effective_status`. This stored field is also what `?status=` filters on
delegateNoTyped delegate identifier
is_validNoTrue only when `effective_status` is `active` AND `invalid_reason` is null. Expiry is decided once, inside the derivation above; `invalid_reason` names the one thing that status cannot express
issued_atNo
principalNoThe proven domain that authorized the delegate — derived from the control proof, never client input
created_atNo
expires_atNoNever later than the control proof's own expiry at issuance (effective expiry is min of the two)
revoked_atNo
environmentNo
control_proofNoThe control proof handle this delegation points down to
delegation_idNoStable public handle (`ph_dlg_<32 hex>`) — also the token's `sub`, and accepted by the proof status endpoint
invalid_reasonNoWhy a delegation whose `effective_status` may still read `active` verifies nowhere, or null. `unsupported_version`: the stored token predates delegation schema 2.0 (or carries no readable schema version), so every verifier refuses it and `GET /proofs/delegation-token/{handle}` does not serve it. Nothing restores it — issue a new delegation and replace the published token
revoked_reasonNo
effective_statusNoDERIVED liveness, computed at read time from BOTH clocks that govern a delegation: the control proof it stands on (cascade rule a — revoked, suspended or expired flows through) and its own `expires_at` (rule b — effective expiry is the earlier of the two). Either one running out reports `expired` here while the delegation's own `status` stays untouched. This is the field to render — `status` alone would show a live badge on a delegation every verifier already rejects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / invalid_reason
      Added value: +{
      +  "description": "Why a delegation whose `effective_status` may still read `active` verifies nowhere, or null. `unsupported_version`: the stored token predates delegation schema 2.0 (or carries no readable schema version), so every verifier refuses it and `GET /proofs/delegation-token/{handle}` does not serve it. Nothing restores it — issue a new delegation and replace the published token"
      +}
    • changedOutput schema / properties / is_valid / description
      Previous value: -"True only when `effective_status` is `active`. It is a restatement of that field, not a second opinion: expiry is decided once, inside the derivation above"New value: +"True only when `effective_status` is `active` AND `invalid_reason` is null. Expiry is decided once, inside the derivation above; `invalid_reason` names the one thing that status cannot express"
  2. Changed3 schema fields changed
    • removedInput schema / properties / scope
      Removed value: -{
      -  "description": "1-32 capability scopes: lowercase kebab-case tokens, at most 64 characters each (e.g. send-email). NOT API scopes — an API-style resource:action such as payments:read is rejected with invalid_scope.",
      -  "items": {
      -    "maxLength": 64,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "maxItems": 32,
      -  "minItems": 1,
      -  "type": "array"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "control_proof",
      -  "delegate",
      -  "scope"
      -]New value: +[
      +  "control_proof",
      +  "delegate"
      +]
    • addedOutput schema / properties / scope / description
      Added value: +"Deprecated. Delegation schema 2.0 carries no scope; this array stays for the SDKs released before it: the scope a delegation issued before schema 2.0 was stored with, otherwise empty. Removed in the next major version."
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "control_proof": {
      +      "description": "The control proof handle this delegation points down to"
      +    },
      +    "created_at": {},
      +    "delegate": {
      +      "description": "Typed delegate identifier"
      +    },
      +    "delegation_id": {
      +      "description": "Stable public handle (`ph_dlg_<32 hex>`) — also the token's `sub`, and accepted by the proof status endpoint"
      +    },
      +    "effective_status": {
      +      "description": "DERIVED liveness, computed at read time from BOTH clocks that govern a delegation: the control proof it stands on (cascade rule a — revoked, suspended or expired flows through) and its own `expires_at` (rule b — effective expiry is the earlier of the two). Either one running out reports `expired` here while the delegation's own `status` stays untouched. This is the field to render — `status` alone would show a live badge on a delegation every verifier already rejects"
      +    },
      +    "environment": {},
      +    "expires_at": {
      +      "description": "Never later than the control proof's own expiry at issuance (effective expiry is min of the two)"
      +    },
      +    "id": {
      +      "description": "MongoDB ObjectId"
      +    },
      +    "is_valid": {
      +      "description": "True only when `effective_status` is `active`. It is a restatement of that field, not a second opinion: expiry is decided once, inside the derivation above"
      +    },
      +    "issued_at": {},
      +    "principal": {
      +      "description": "The proven domain that authorized the delegate — derived from the control proof, never client input"
      +    },
      +    "revoked_at": {},
      +    "revoked_reason": {},
      +    "scope": {},
      +    "status": {
      +      "description": "The owner's OWN record — whether they revoked this delegation themselves. Nothing else writes it: neither the control proof dying nor this delegation's own lifetime running out. Liveness is DERIVED and reported separately as `effective_status`. This stored field is also what `?status=` filters on"
      +    },
      +    "token": {
      +      "description": "The signed delegation JWT — the PUBLISHABLE artifact (publish it in your MCP server card under `_meta` → `holdings.proof/delegation`). Same key, algorithm and JWKS as proof tokens"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / delegate / additionalProperties
      Removed value: -false
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only say non-read-only, non-destructive; the description adds substantially: each mint is billable, lifetimes exceeding the control proof's remainder are rejected rather than truncated, and the result carries both the token and derived effective_status/is_valid. It doesn't detail idempotency or error shapes, but the added context is rich.

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?

Front-loaded purpose is strong, but the run-on sentence with em-dashes and parentheticals is dense, and the ACCESS block repeats auth instructions at length. Most content earns its place, though tighter phrasing would help.

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?

For a billable mint tool with an output schema, the description covers authorization semantics, lifetime constraints, and result shape adequately. Missing only failure/error behavior and idempotency notes.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description adds cross-parameter semantics the schema cannot express: expires_in is constrained by the control proof's remainder and is rejected rather than truncated, and control_proof must be YOUR active domain proof. These are meaningful operational constraints beyond the field descriptions.

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 (create) and resource (delegation/Proof of Delegation), explains what the artifact is (signed token authorizing a typed url/purl artifact by a control-proven domain), and explicitly bounds the semantic scope (says nothing about the artifact or the business behind it). Clearly distinguishable from get/verify/revoke siblings.

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

Usage Guidelines4/5

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

Provides explicit access prerequisites and an alternative path (Authenticate via /mcp; start_login does NOT open this tool), which prevents a common failure. It doesn't name when to prefer create_delegation over other create_* tools, but the domain is narrow enough that this is minor.

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.