Memory grants list
GET /api/memory/grantsList the wallets you've granted access to your namespace, with their mode and expiry. Send GET /api/memory/grants with no input and pay $0.001 per call over x402 with USDC on an EVM chain (the paying wallet is the identity). It returns a JSON object with owner and grants.
Parameters
Memory grants list takes no parameters.
Example request
curl -i "https://agent402.tools/api/memory/grants"
Without payment this returns HTTP 402 Payment Required with the exact price for memory-grants; any x402 v2 or MPP client pays it and retries.
Example response
{
"owner": "0x…",
"grants": [
{
"grantee": "0x1111…",
"mode": "read",
"active": true
}
]
}
| Field | Type | Always present | In the example |
|---|---|---|---|
owner | string | yes | 0x… |
grants | array of objects | yes | 1 item in the example |
From an MCP client
catalog.call {
"slug": "memory-grants",
"params": {}
}
The hosted connector at https://agent402.tools/mcp needs a payment for memory-grants; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY (wallet only for this tool). Local install: npx -y agent402-mcp.
Errors and behavior
- There is no input to get wrong: any request to /api/memory/grants runs the tool.
- A paid call that ends in any status of 400 or above is not charged over x402 or MPP: settlement is cancelled when the tool fails.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier.
- Identity-bound: results are keyed to the wallet that signed the payment, so only EVM x402 payments are accepted; credits keys and Tempo are refused.
- A
POSTwith a JSON body to /api/memory/grants is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/memory/grants");
Related tools
Memory grant
POST /api/memory/grantShare your namespace with another wallet so different agents can coordinate through it. Grant read or readwrite access t…
Memory revoke
POST /api/memory/revokeRevoke a previously granted wallet's access to your namespace.
Memory compare-and-set
POST /api/memory/casAtomically write (or release) a key only if its current value equals `expected` - the coordination primitive for distrib…
Memory forget
POST /api/memory/forgetDelete a remembered document by id from the recall store.
Memory counter
POST /api/memory/incrAtomically increment (or decrement) a numeric key and return the new value - a coordination primitive for counters, lock…
Memory audit log
GET /api/memory/logTamper-evident history of every change to a namespace - an append-only, hash-chained audit log the server attests to (pr…