Skip to main content
This page is the single source of truth for the curl auth-header pattern, the TypeScript thin wrapper (glide-client.ts), and the Python thin wrapper (glide_client.py). Use these wrappers with the category and input schema on each tool page. Supply your own grant, identifiers and approval callback. TypeScript uses built-in fetch; Python requires httpx.

curl reference

The per-tool reference examples use this direct JSON-RPC pattern where the gateway supports it. The cookbook quickstarts use the standard MCP tools/call envelope:
Replace {category} with read, write, or treasury depending on the tool. The per-tool pages show which endpoint to use in each example. Environment variable: Store your grant token in GLIDE_GRANT_TOKEN. Never hard-code tokens in scripts — they appear in shell history and process listings. Content-Type: Always application/json. The server rejects requests without this header. Idempotency key: For tools that require one (Idempotency key required: yes in the Metadata table), pass params.idempotency_key. You can also include a matching header:
The header alone does not satisfy the input schema. Base URL: The base URL is category-prefixed. Use https://mcp.glide.co/mcp/read for read tools, https://mcp.glide.co/mcp/write for write tools, and https://mcp.glide.co/mcp/treasury for treasury tools. Calling a tool on the wrong category endpoint returns a confused-deputy error. Each per-tool page shows the correct endpoint in its curl example.

TypeScript wrapper

Save as glide-client.ts in your project. Requires Node 18+ for native fetch.
TypeScript
Usage pattern for step-up tools:
TypeScript

Python wrapper

Save as glide_client.py. Requires httpx (pip install httpx).
Python
Usage pattern for step-up tools:
Python

Idempotency keys

Set an idempotency key on tools whose metadata requires one — payments, card issuance, scheduled transfers, beneficiary mutations, and yield allocations. Reuse the same key and parameters to recover a recorded result. Resolve an uncertain payment status before creating a new key; a client-side key alone does not establish end-to-end settlement idempotency. When to set one: Format: Any string 8–128 characters long. Use a deterministic key derived from the operation’s business meaning — payment-{orderId}, sched-payroll-{date}-{recipientId}, x402-{resourceHash}-{agentRunId}. UUIDs work but don’t survive process restarts without persistence. Scope: Keys are scoped to (agent_principal_id, tool_name) — the same key is safe to reuse across different tools.

Reading list

  • OAuth flow — how to obtain a grant token using client_credentials.
  • Policy envelope — the policy checks used by applicable tools.
  • Step-up flow — the full approval sequence for step-up gated tools.
  • Receipts — activity records and settlement receipt formats.
  • Tool reference — documented tools; query your gateway for current availability.