Skip to main content
Glama

set_wallet_policy

Idempotent

Configure the caller's own trading limits and rules on an agent wallet.

policies: a list of {policy_type, value, enabled?} objects. policy_type is one of max_trade_size {"usd"} | daily_limit {"usd"} | approved_tokens {"tokens"} | banned_tokens {"tokens"} | position_limit {"usd"} | kill_switch {"active"} | drawdown_limit {"max_pct"} | max_daily_loss {"usd"} | trade_velocity {"max_per_hour", "max_per_day"} | venue_allowlist {"venues"}. Upserts by policy_type; returns the full updated policy set. perp_leverage_limit {"max_leverage": "5"} (caps the leverage a perp open may request, >= 1; above it is rejected, never clamped -- "no perps" is disabled_actions ["perp_open"]). On a Lane 2 wallet, a change that would LOOSEN a server-enforced default raises BROWSER_CONFIRMATION_REQUIRED -- call request_wallet_policy_loosening instead.

Permission mode: a configuration write -- allowed in every permission_mode, observe included; the ladder gates value-bearing actions, not config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policiesYes
caller_idNo
wallet_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (idempotent, non-destructive, open-world), but the description adds substantial behavior beyond them: upsert-by-policy_type semantics, that it returns the full updated policy set, that leverage above the cap is rejected rather than clamped, and the browser-confirmation escalation path. This is genuinely useful operational context, not a restatement of annotations.

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

Conciseness4/5

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

The purpose and the routing rule are front-loaded, and despite being long, nearly every sentence carries unique information (policy types, rejection semantics, confirmation flow, permission-mode note). Some of the inline formatting is dense and could be tightened, but there is little pure filler.

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

Completeness5/5

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

For a configuration-write tool with an output schema present, the description covers what the agent must know: what it mutates, upsert behavior, the return set, failure/escalation paths, and permission-mode eligibility. Nothing material for correct invocation is missing.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the full burden, and it does so well for `policies`: it enumerates every policy_type and the value keys each expects (e.g. trade_velocity {max_per_hour, max_per_day}, perp_leverage_limit {max_leverage}). It adds little for caller_id or wallet_address, but those are self-explanatory, so the compensation is strong though not total.

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 opens with a precise verb+resource ('Configure the caller's own trading limits and rules on an agent wallet'), scopes it to the caller's own wallet, and distinguishes it from the sibling request_wallet_policy_loosening by naming that tool explicitly. An agent can tell this apart from request_wallet_policy_loosening or set_permission_mode without opening any schema.

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

Usage Guidelines5/5

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

It states the exact condition that routes to an alternative: on a Lane 2 wallet, a change that would LOOSEN a server-enforced default raises BROWSER_CONFIRMATION_REQUIRED and the agent must call request_wallet_policy_loosening instead. It also clarifies when this tool is permitted ('allowed in every permission_mode, observe included'), which is a non-obvious prerequisite for a write tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources