Skip to main content
Glama

get_policies

Retrieve spending limits, whitelists, rate limits, and other rules applied to a wallet.

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

  • Primary handler + registration for the 'get_policies' tool. Defines the tool with Zod schema (wallet_id, limit, offset), makes a GET /v1/policies request via the ApiClient, and returns results via toToolResult. Registered as 'get_policies' on the MCP server.
    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);
        },
      );
    }
  • Input schema for get_policies: optional wallet_id (string), limit (int 1-200, default 50), offset (int >=0, default 0).
    {
      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)'),
    },
  • Registration call in the main MCP server: registerGetPolicies(server, apiClient, walletContext) on line 91.
    registerGetPolicies(server, apiClient, walletContext);
  • Import of registerGetPolicies from './tools/get-policies.js'.
    import { registerGetPolicies } from './tools/get-policies.js';
  • Alternate implementation of get_policies in the OpenClaw plugin (Tool 15). Uses the same GET /v1/policies endpoint with similar input schema but registered via PluginApi.registerTool.
    // Tool 15: get_policies
    api.registerTool({
      name: 'get_policies',
      description: 'Get policies applied to the wallet. Shows spending limits, whitelists, rate limits, and other rules.',
      inputSchema: {
        type: 'object',
        properties: {
          wallet_id: { type: 'string', description: 'Target wallet ID.' },
          limit: { type: 'number', description: 'Max items to return (default: 50)' },
          offset: { type: 'number', description: 'Number of items to skip (default: 0)' },
        },
      },
      handler: async (args) => {
        const params = new URLSearchParams();
        if (typeof args['wallet_id'] === 'string') 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 client.get('/v1/policies' + (qs ? '?' + qs : ''));
        return toResult(result);
      },
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden of behavioral disclosure. While 'Get policies' suggests a read operation, the description does not explicitly state that it is read-only or disclose any side effects, permissions, or other behavioral traits. The lack of explicit transparency is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—two sentences with no fluff. The main purpose is front-loaded, and the examples are efficiently listed. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple getter, the description is minimally adequate. It describes the kind of data returned (policies), but does not cover response format, pagination details beyond the schema, or any prerequisites. There is room for improvement but no critical omissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with each parameter (wallet_id, limit, offset) already documented. The description adds no additional context beyond the schema, but the baseline of 3 is appropriate since the schema is self-sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves policies applied to a wallet and lists specific examples (spending limits, whitelists, rate limits, other rules). This distinguishes it from sibling tools like get_wallet_info or get_balance, which address different aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when policies need to be viewed, but it does not provide explicit guidance on when to use this tool versus alternatives. No when-not-to-use or alternative tool names are mentioned, leaving the agent to infer context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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