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.

Spawn a child agent with a scoped multisig sub-vault and a policy envelope. The operation is a saga — on any failure the partial state rolls back and the 10-min reaper cleans up anything in-flight.

Metadata

FieldValue
Nameagent.budget.create
Categorytreasury
Required scopeagent:budget:create
Idempotency key requiredyes

Annotations

AnnotationValue
TitleCreate Agent Budget
Read-onlyno
Destructiveno
Idempotentyes
Open-worldno
Requires human approvalyes (step-up)

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "purpose": {
      "type": "string",
      "enum": [
        "ap",
        "treasury",
        "trip",
        "market-research",
        "payroll",
        "multi-chain-concierge",
        "custom"
      ]
    },
    "display_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "amount_cap_cents_per_tx": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "amount_cap_cents_per_day": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "amount_cap_cents_lifetime": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "step_up_amount_cents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "chain_allowlist": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "eth",
          "base",
          "arb",
          "op",
          "polygon",
          "sol"
        ]
      }
    },
    "time_window_end": {
      "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))$"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "purpose",
    "display_name",
    "chain_allowlist",
    "idempotency_key"
  ],
  "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)$"
    },
    "vault_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)$"
    },
    "policy_version": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "active"
      ]
    },
    "created_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))$"
    }
  },
  "required": [
    "agent_principal_id",
    "vault_id",
    "policy_version",
    "status",
    "created_at"
  ],
  "additionalProperties": false
}

Auth

Caller’s grant must include the agent:budget:create 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.create",
    "params": {
      "purpose": "ap",
      "display_name": "Accounts Payable Agent — Q3 2026",
      "amount_cap_cents_per_tx": 250000,
      "amount_cap_cents_per_day": 1000000,
      "amount_cap_cents_lifetime": 5000000,
      "step_up_amount_cents": 100000,
      "chain_allowlist": ["base", "eth"],
      "idempotency_key": "ap-agent-q3-2026-bootstrap-001"
    }
  }'

Response examples

Success — agent provisioned and active:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "agent_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "vault_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "policy_version": 1,
    "status": "active",
    "created_at": "2026-05-04T10:30:00Z"
  }
}
Saga still in-flight (poll until status: "active"):
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "agent_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "vault_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "policy_version": 0,
    "status": "draft",
    "created_at": "2026-05-04T10:30:00Z"
  }
}
Insufficient scope:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32001,
    "message": "grant does not include scope agent:budget:create",
    "data": { "reason_id": "insufficient_scope" }
  }
}

Errors

CodeNameCauseRemediation
-32600Invalid requestMalformed JSON-RPC envelopeCheck method, jsonrpc, and id fields
-32602Invalid paramsMissing required field or enum value out of rangeValidate against the input schema before calling
-32001UnauthorizedMissing or expired grant tokenRefresh via agent.grant.refresh
-32002Policy deniedGrant missing agent:budget:create scopeIssue a new grant with the required scope
-32004Rate limitedToo many saga starts in a short windowBack off by retry_after_seconds in the error data
-32005Vault contentionParent vault already involved in another sagaRetry with exponential backoff
-32603Internal errorSaga step failed; partial state will be reaped within 10 minRetry with the same idempotency_key