Skip to main content
Glama

get_delegation

Read-only

Get one of your delegations by Mongo id or ph_dlg_* handle. Returns the stored publishable token plus the DERIVED effective_status/is_valid — the delegation is only as live as the control proof it stands on (a revoked, suspended or expired domain proof invalidates it) and never outlives its own expires_at, whichever comes first. invalid_reason unsupported_version means the token predates delegation schema 2.0 and no verifier accepts it (is_valid false) — issue a new delegation and publish its token instead.

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": {
      "id": "<id>"
    },
    "name": "get_delegation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDelegation ID (24-hex Mongo id or ph_dlg_<32 hex> handle)

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. Changed1 schema field changed
    • 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. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  5. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds real behavioral depth beyond that: the status is derived, validity is bounded by the control proof's state and by expires_at ('whichever comes first'), and unsupported_version carries a specific meaning. It also discloses the account/auth requirement and warns that start_login does not unlock this tool.

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?

Front-loaded with purpose and identifier forms, then semantics, then access prerequisites in a separate block. Sentences are dense but each carries content; the access paragraph is somewhat boilerplate but is genuinely needed to avoid an auth dead end.

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?

Output schema exists and the description still explains the derived fields' derivation rules, which is the non-obvious part. Combined with auth prerequisites and the version-mismatch remedy, nothing an agent needs to call or interpret this correctly is missing.

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?

Only one parameter and schema coverage is 100%, so the schema already documents the id pattern and format. The description restates the two accepted id forms inline, which confirms but does not meaningfully extend the schema — baseline 3 applies.

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 specific verb and resource ('Get one of your delegations') and names the accepted identifier forms (24-hex Mongo id or ph_dlg_* handle), plus what comes back (stored publishable token plus derived effective_status/is_valid). It stops short of explicitly distinguishing itself from near-siblings like get_delegation_token or verify_delegation, but the scope is unambiguous.

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?

Gives a concrete recovery path for the unsupported_version case ('issue a new delegation and publish its token instead') and clear auth prerequisites. However it never says when to prefer this over get_delegation_token or verify_delegation, so the agent must infer the selection rule from names alone.

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.