get_policies
Retrieve wallet policies including spending limits, whitelists, rate limits, and other rules to manage access and security controls.
Instructions
Get policies applied to the wallet. Shows spending limits, whitelists, rate limits, and other rules.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet. | |
| limit | No | Max items to return (default: 50) | |
| offset | No | Number of items to skip (default: 0) |
Implementation Reference
- The `registerGetPolicies` function registers the 'get_policies' tool and contains the implementation logic that calls the `/v1/policies` API endpoint.
export function registerGetPolicies(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void { server.tool( 'get_policies', withWalletPrefix('Get policies applied to the wallet. Shows spending limits, whitelists, rate limits, and other rules.', walletContext?.walletName), { wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'), limit: z.number().int().min(1).max(200).optional().describe('Max items to return (default: 50)'), offset: z.number().int().min(0).optional().describe('Number of items to skip (default: 0)'), }, async (args) => { const params = new URLSearchParams(); if (args.wallet_id) params.set('walletId', args.wallet_id); if (args.limit !== undefined) params.set('limit', String(args.limit)); if (args.offset !== undefined) params.set('offset', String(args.offset)); const qs = params.toString(); const result = await apiClient.get('/v1/policies' + (qs ? '?' + qs : '')); return toToolResult(result); }, ); }