get_delegation
Retrieve a delegation by Mongo ID or ph_dlg handle to get its publishable token and derived effective status/validity, including whether its control proof and expiry still keep it live.
Instructions
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.
ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Delegation ID (24-hex Mongo id or ph_dlg_<32 hex> handle) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | MongoDB ObjectId | |
| scope | No | 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. | |
| token | No | 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 | |
| status | No | 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 | |
| delegate | No | Typed delegate identifier | |
| is_valid | No | 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 | No | ||
| principal | No | The proven domain that authorized the delegate — derived from the control proof, never client input | |
| created_at | No | ||
| expires_at | No | Never later than the control proof's own expiry at issuance (effective expiry is min of the two) | |
| revoked_at | No | ||
| environment | No | ||
| control_proof | No | The control proof handle this delegation points down to | |
| delegation_id | No | Stable public handle (`ph_dlg_<32 hex>`) — also the token's `sub`, and accepted by the proof status endpoint | |
| revoked_reason | No | ||
| effective_status | No | 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 |