Skip to main content
Glama

execute_cross_perp

Destructive

Execute a cross-margin perpetual trade directly with your private key; supports take-profit, stop-loss, and builder fees.

Instructions

Execute a cross-margin perpetual trade directly with a private key (no managed custody). Supports TP/SL and builder fees.

Input Schema

NameRequiredDescriptionDefault
coinYesAsset symbol, e.g. 'BTC'
priceYesPrice in USD
isLongYesTrue for long, false for short
isMarketNoTrue for market, false for limit
leverageNoLeverage for cross-margin (calls updateLeverage before placing)
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
privateKeyNoWallet private key (hex)
reduceOnlyNo
positionSizeYesPosition size
stopLossPriceNoStop-loss price
builderFeeRateNoBuilder fee rate in basis points
stopLossTriggerNoStop-loss trigger price
takeProfitPriceNoTake-profit price
builderFeeAddressNoBuilder fee wallet address
takeProfitTriggerNoTake-profit trigger price

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.12.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "privateKey",
      -  "coin",
      -  "isLong",
      -  "price",
      -  "positionSize"
      -]New value: +[
      +  "coin",
      +  "isLong",
      +  "price",
      +  "positionSize"
      +]
  2. First observedv4.11.3

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructive=true, openWorld=true, and readOnly=false, so the safety profile is covered. The description adds useful context about custody mode (private key, no managed custody) and feature support (TP/SL, builder fees), but does not cover risk, reversibility, or auth flow details.

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?

Two sentences, front-loaded with the core action and followed by key features. No wasted words, though the second sentence is a brief feature list rather than deeper guidance.

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?

For a destructive trade tool with 15 parameters and no output schema, the description is somewhat sparse. The schema covers parameter details, but the description does not clarify the relationship between privateKey and accountRef, nor what execution returns, leaving minor gaps.

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 description coverage is 93%, so the schema already documents nearly all parameters. The description mentions TP/SL and builder fees but adds no syntax or format guidance beyond what the schema provides; baseline 3 is appropriate.

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?

States a specific verb and resource ('Execute a cross-margin perpetual trade') and distinguishes itself from sibling execute_isolated_perp via 'cross-margin' and from managed tools via 'directly with a private key (no managed custody)'.

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 a usage condition (private key, no managed custody) but does not explicitly say when to choose this over alternatives like execute_isolated_perp, open_perp_position, or managed tools. Usage is implied rather than spelled out.

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

Deploy Server

Other Tools