Zod schemas and closed-vocabulary types for Glide agent banking. Every schema in this package serves two purposes: it validates data at runtime in TypeScript, and it generates the JSON Schema documents published atDocumentation 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.
glide.co/schemas/agent-banking/draft/* via a build script that converts
Zod’s output to JSON Schema 2020-12.
The TypeScript schemas are the source of truth. The published JSON Schemas
are downstream artifacts — derived, not maintained by hand.
Install
Zod schemas vs. JSON Schemas
| Layer | Where it lives | Who uses it |
|---|---|---|
| Zod schemas | packages/schemas/src/*.ts (this package) | TypeScript / tRPC / MCP server — parse and throw at runtime |
| JSON Schemas | glide.co/schemas/agent-banking/draft/*.json | External implementers, validators in other languages, the standards docs |
scripts/build-json-schemas.mjs calls Zod’s JSON Schema
converter, wraps each output with wrapSchema() to add the canonical $id,
and writes both apps/web/public/schemas/ (the served copy) and dist/schemas/
(the standalone artifact). The $id URL is what external consumers should
cite — the host is a deployment detail.
Published schema names
| Schema name | $id (draft channel) |
|---|---|
connector-manifest | https://glide.co/schemas/agent-banking/draft/connector-manifest.json |
agent-policy-envelope | https://glide.co/schemas/agent-banking/draft/agent-policy-envelope.json |
agent-activity-event | https://glide.co/schemas/agent-banking/draft/agent-activity-event.json |
trust-tier | https://glide.co/schemas/agent-banking/draft/trust-tier.json |
scoped-grant-claims | https://glide.co/schemas/agent-banking/draft/scoped-grant-claims.json |
skill-manifest | https://glide.co/schemas/agent-banking/draft/skill-manifest.json |
grant | https://glide.co/schemas/agent-banking/draft/grant.json |
receipt | https://glide.co/schemas/agent-banking/draft/receipt.json |
/draft/ URLs until 3+ independent implementers exist.
Promotion to /v1/ is an explicit, announced event.
Core schemas
AgentPolicyEnvelope — the 14-axis policy evaluated by@glideco/policy-engine
on every agent tool call. Covers amount caps (per-tx, per-day, lifetime),
step-up threshold, counterparty allowlist, velocity limits, chain allowlist,
geo allowlist, MCC allow/block lists, and an absolute time window. An empty
counterparty_allowlist is fail-closed: the engine denies all counterparties.
GrantClaims — OAuth 2.0 / RFC 7519 JWT claims with RFC 8707 resource
indicators. The aud field carries both vault_id and entity_id (non-standard
object form); verifiers must check both. Max TTL is 60 minutes enforced by
grantClaimsValidatedSchema. The act (RFC 8693 actor) claim is always required
— missing means denied at the verifier.
Receipt — the tool-call receipt persisted in activity_log after every
money-touching MCP call settles. on_chain_tx is server-fetched from chain RPC,
never from a facilitator response body — a money-safety rule inherited from
x402.pay client-receipt-trust learnings.
AgentScope — closed vocabulary of 15 MCP scopes a grant can carry. Adding a
scope is a CODEOWNERS-protected change because the policy-engine evaluator must
understand the same set.
Usage
CAIP-2 translation
@glideco/schemas exports chainIdToCaip2() and caip2ToChainId() for
translating between Glide’s internal short-ids (eth, sol) and the
CAIP-2 wire form that x402, AP2, and ACP protocols carry.
BSC (bsc) is deliberately excluded: USDC on BSC has 18 decimals vs. 6
everywhere else, which would silently underflow amount-in-cents math by 10^12.
Building a JSON Schema for publication
Reading list
- Standards overview — the public standards namespace these schemas underpin.
- ConnectorManifest standard
- AgentPolicyEnvelope standard
@glideco/policy-engine— evaluatesAgentPolicyEnvelopeat runtime.@glideco/kya-vc— usescanonicalJsonfrom this package for VC signing.- Source on GitHub