Metadata
| Field | Value |
|---|---|
| Name | payments.simulate |
| Category | read |
| Required scope | payments:simulate |
| Idempotency key required | no |
Annotations
| Annotation | Value |
|---|---|
| Title | Simulate Payment |
| Read-only | yes |
| Destructive | no |
| Idempotent | yes |
| Open-world | no |
| Requires human approval | no |
Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"counterparty": {
"type": "object",
"properties": {
"address": {
"type": "string",
"minLength": 1
},
"chain": {
"type": "string",
"enum": [
"eth",
"base",
"arb",
"op",
"polygon",
"sol"
]
},
"token": {
"type": "string",
"minLength": 1
}
},
"required": [
"address",
"chain",
"token"
],
"additionalProperties": false
},
"amount_cents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 8
},
"mcc": {
"type": "string",
"minLength": 4,
"maxLength": 4
},
"geo": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"counterparty",
"amount_cents",
"currency"
],
"additionalProperties": false
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"verdict": {
"type": "string",
"enum": [
"allow",
"allow_with_step_up",
"deny"
]
},
"policy_version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reasons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"axis": {
"type": "string"
},
"reason_id": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"axis",
"reason_id",
"message"
],
"additionalProperties": false
}
},
"simulated_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": [
"verdict",
"policy_version",
"reasons",
"simulated_at"
],
"additionalProperties": false
}
Auth
Caller’s grant must include thepayments:simulate scope. Grants whose scope set is a superset of the required scope are accepted.
Request examples
curl -X POST https://mcp.glide.co/mcp/read \
-H "Authorization: Bearer $GLIDE_GRANT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "payments.simulate",
"params": {
"counterparty": {
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"chain": "base",
"token": "USDC"
},
"amount_cents": 75000,
"currency": "USD",
"mcc": "7372"
}
}'
import { GlideClient } from './glide-client';
const client = new GlideClient({ grantToken: process.env.GLIDE_GRANT_TOKEN! });
const result = await client.call('payments.simulate', {
counterparty: {
address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
chain: 'base',
token: 'USDC',
},
amount_cents: 75000,
currency: 'USD',
mcc: '7372',
});
if (result.verdict === 'deny') {
console.error('Payment would be denied:', result.reasons);
} else if (result.verdict === 'allow_with_step_up') {
console.log('Payment requires step-up before initiating');
} else {
console.log('Payment would be allowed — safe to call payments.initiate');
}
from glide_client import GlideClient
import os
client = GlideClient(grant_token=os.environ["GLIDE_GRANT_TOKEN"])
result = client.call("payments.simulate", {
"counterparty": {
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"chain": "base",
"token": "USDC",
},
"amount_cents": 75000,
"currency": "USD",
"mcc": "7372",
})
print(result["verdict"], result["reasons"])
Response examples
Verdict — allowed:{
"jsonrpc": "2.0",
"id": 1,
"result": {
"verdict": "allow",
"policy_version": 3,
"reasons": [],
"simulated_at": "2026-05-04T12:00:00Z"
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"verdict": "allow_with_step_up",
"policy_version": 3,
"reasons": [
{
"axis": "amount",
"reason_id": "step_up_threshold",
"message": "amount 750000 exceeds step_up_amount_cents 100000"
}
],
"simulated_at": "2026-05-04T12:00:00Z"
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"verdict": "deny",
"policy_version": 3,
"reasons": [
{
"axis": "velocity",
"reason_id": "daily_cap_exceeded",
"message": "daily spend cap of 100000 cents would be exceeded; current spend 90000"
}
],
"simulated_at": "2026-05-04T12:00:00Z"
}
}
Errors
| Code | Name | Cause | Remediation |
|---|---|---|---|
-32600 | Invalid request | Malformed JSON-RPC envelope | Check method, jsonrpc, and id fields |
-32602 | Invalid params | counterparty.chain not in enum, currency empty, or MCC not exactly 4 digits | Validate against the input schema before calling |
-32001 | Unauthorized | Missing/expired grant token | Refresh via agent.grant.refresh |
-32002 | Policy denied | Grant missing payments:simulate scope | Issue a new grant with the required scope |
-32603 | Internal error | Envelope or velocity-context fetch failed | Retry — simulate has no side effects |