Skip to main content
Glama

set_trading_limits

Idempotent

Configure per-token trading caps (TradingLimit) on the caller's agent wallet.

limits: a list of {token_address, max_position_size?, max_single_trade?, daily_volume_limit?} objects, USD amounts (> 0, up to 6 decimals). Upserts by token_address; only the cap keys you include are written -- an omitted key keeps its stored value, an explicit null clears it (uncapped). Returns the full updated set read back from the server, plus enforcement (which rails read each column today). Pure Django write: unlike set_wallet_policy there is no Turnkey enclave re-push.

On a Lane 2 wallet, raising or clearing an existing cap is refused (POLICY_VIOLATION) -- the owner loosens it from their authenticated session. Tightening always applies.

Permission mode: a configuration write -- allowed in every permission_mode, observe included (same class as set_wallet_policy).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitsYes
caller_idNo
wallet_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover safety hints (readOnly=false, idempotent=true, destructive=false), and the description adds substantial context beyond them: upsert-by-token_address semantics, omitted-key vs explicit-null behavior, the returned payload plus an 'enforcement' field, no enclave re-push, and the POLICY_VIOLATION refusal on Lane 2 wallets. This is unusually rich behavioral disclosure.

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 scoping statement and the limits contract are front-loaded, and every paragraph carries non-obvious information (upsert semantics, refusal rule, permission mode). It is dense rather than padded, though the prose is longer than strictly needed and could be tightened.

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 mutation tool with a real output schema, the description covers the write semantics, the failure mode, the permission interaction, and the distinction from the nearest sibling. An agent has everything needed to invoke it correctly.

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% and the nested limits object is typed only as a loose object, so the description must compensate: it does, by enumerating token_address, max_position_size, max_single_trade, daily_volume_limit and giving units and bounds (USD, > 0, up to 6 decimals). wallet_address and caller_id are left unexplained, but their meaning is self-evident from required/default fields.

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 first sentence names a specific verb+resource+target ('Configure per-token trading caps (TradingLimit) on the caller's agent wallet'). It further differentiates itself from siblings by naming set_wallet_policy and contrasting the lack of a Turnkey enclave re-push, so an agent can distinguish it from the many other write tools.

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

Usage Guidelines4/5

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

It gives concrete when-it-applies context: allowed in every permission_mode including observe, same class as set_wallet_policy, and it explains the Lane 2 refusal path and that the owner must loosen caps from their authenticated session. It does not explicitly route to get_trading_limits for reads, but the read/write split is implied by the names.

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