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);
        },
      );
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses return content (spending limits, whitelists, rules) but omits safety traits (read-only nature), error behaviors, or auth requirements. Acceptable but minimal disclosure for a query tool.

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?

Two sentences with zero waste. First establishes operation and target; second enumerates specific return content. Appropriately front-loaded and avoids redundancy with the schema.

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

Completeness4/5

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

Given no output schema exists, the description adequately compensates by enumerating expected return categories (limits, whitelists, rules). Covers the conceptual scope sufficiently for a simple read operation with optional pagination parameters.

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?

Schema coverage is 100%, establishing a baseline of 3. The description implies the wallet_id parameter via 'applied to the wallet' but adds no semantic detail about the pagination parameters (limit/offset) or the auto-resolution behavior mentioned in the schema.

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

Purpose4/5

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

States specific action (Get) and resource (policies applied to the wallet) and distinguishes content from siblings by listing specific constraint types (spending limits, whitelists, rate limits). However, it does not explicitly differentiate when to use this versus get_wallet_info or inspect-related siblings.

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

Usage Guidelines2/5

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

Provides no explicit guidance on when to prefer this tool over get_wallet_info or other inspection tools, nor does it mention prerequisites like wallet authentication requirements. Usage must be inferred from the generic description.

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