Skip to main content
Glama

open_gmx_position

Open a leveraged perpetual position on GMX V2 (Arbitrum) by specifying market, collateral, position size, and direction. Returns a transaction ID for tracking.

Instructions

Opens a leveraged perpetual position on GMX V2 (Arbitrum). Creates a MarketIncrease order that is executed by a GMX keeper after oracle price update. Specify the market (e.g. "ETH/USD"), collateral amount, position size in USD, and direction (long/short). Returns a transaction ID to track with get_transaction_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketYesMarket label (e.g. "ETH/USD", "BTC/USD") or market token address.
is_longYestrue to go long (price goes up = profit), false to go short.
chain_idNoChain ID. Default: 42161 (Arbitrum One).
size_delta_usdYesPosition size in USD with 30 decimals (GMX precision). Example: "1000000000000000000000000000000000" for $1000. Tip: multiply desired USD amount by 10^30.
acceptable_priceYesMax acceptable execution price with 30 decimals. For longs, set above current price. For shorts, set below. Example: use a 1% buffer above/below market price.
collateral_tokenYesCollateral token address. Use WETH for ETH-collateralized positions.
collateral_amountYesCollateral amount in human-readable units. Example: "0.5" for 0.5 WETH.
Behavior3/5

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

With no annotations, the description carries full burden. It reveals the order is executed asynchronously by a keeper after oracle update. However, it omits safety details like slippage, liquidation risk, fees, and required token approvals.

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?

Four sentences front-loaded with action, mechanism, inputs, and return. No wasted words; every sentence earns its place.

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?

Covers main purpose and return but misses operational details like token approvals, leverage mechanics, optional chain_id, and references to sibling tools. For a complex DeFi tool, the description is adequate but not comprehensive.

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 coverage is 100% (baseline 3). The description adds value with usage tips and examples for size_delta_usd (30 decimals, example), acceptable_price (buffer guidance), and collateral_token (use WETH). This enhances understanding beyond the schema.

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 action (opens a leveraged perpetual position), the resource (GMX V2 on Arbitrum), and the mechanism (MarketIncrease order via keeper). It differentiates from siblings like 'close_gmx_position' and 'list_gmx_markets' by focusing on opening positions.

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?

Provides usage context (returns transaction ID for tracking with get_transaction_status) but does not explicitly state when to use vs alternatives or when not to use. Lacks mention of prerequisites like collateral approval or market availability.

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/felippeyann/agentfi'

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