Skip to main content
Glama

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
NameRequiredDescriptionDefault
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.
limitNoMax items to return (default: 50)
offsetNoNumber 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);
        },
      );
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minhoyoo-iotrust/WAIaaS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server