Skip to main content

Documentation Index

Fetch the complete documentation index at: https://glide-9da73dea.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Revoke a child agent and optionally auto-sweep its sub-vault back to the parent treasury. Revocation is terminal; spawn a new agent via agent.budget.create to re-provision.

Metadata

FieldValue
Nameagent.budget.revoke
Categorytreasury
Required scopeagent:budget:revoke
Idempotency key requiredno

Annotations

AnnotationValue
TitleRevoke Agent Budget
Read-onlyno
Destructiveyes
Idempotentyes
Open-worldno
Requires human approvalno

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agent_principal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "auto_sweep": {
      "default": true,
      "type": "boolean"
    },
    "reason": {
      "default": "user_request",
      "type": "string",
      "enum": [
        "user_request",
        "anomaly",
        "admin_kill_switch",
        "expired",
        "migration"
      ]
    }
  },
  "required": [
    "agent_principal_id",
    "auto_sweep",
    "reason"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "agent_principal_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "revoked_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "grants_revoked": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "sweep_plan_queued": {
      "type": "boolean"
    }
  },
  "required": [
    "agent_principal_id",
    "revoked_at",
    "grants_revoked",
    "sweep_plan_queued"
  ],
  "additionalProperties": false
}

Auth

Caller’s grant must include the agent:budget:revoke scope. Grants whose scope set is a superset of the required scope are accepted.

Request examples

curl -X POST https://mcp.glide.co/mcp/treasury \
  -H "Authorization: Bearer $GLIDE_GRANT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "agent.budget.revoke",
    "params": {
      "agent_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "auto_sweep": true,
      "reason": "user_request"
    }
  }'

Response examples

Success — agent revoked and sweep queued:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "agent_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "revoked_at": "2026-05-04T11:00:00Z",
    "grants_revoked": 3,
    "sweep_plan_queued": true
  }
}
Agent already revoked (idempotent re-call):
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "agent a1b2c3d4-e5f6-7890-abcd-ef1234567890 was already revoked",
    "data": { "reason_id": "already_revoked" }
  }
}

Errors

CodeNameCauseRemediation
-32600Invalid requestMalformed JSON-RPC envelopeCheck method, jsonrpc, and id fields
-32602Invalid paramsagent_principal_id not a valid UUID, or agent was already revokedCheck reason_idalready_revoked means a prior call succeeded
-32001UnauthorizedGrant belongs to a different tenant than the target agentConfirm agent_principal_id was created by the calling entity
-32002Policy deniedGrant missing agent:budget:revoke scopeIssue a new grant with the required scope
-32603Internal errorSweep-plan write failed; agent row is revoked but sweep may need manual triggerCheck sweep_plan_queued in a retry response