Skip to main content
Glama
drasticstatic

hummingbot-mcp

set_account_position_mode_and_leverage

Set the position mode (HEDGE or ONE-WAY) and/or leverage for an account on a specified exchange. Adjust trading parameters independently—only one setting required per call.

Instructions

Set position mode and leverage for an account on a specific exchange. If position mode is not specified, will only set the leverage. If leverage is not specified, will only set the position mode.

Args:
    account_name: Account name (default: master_account)
    connector_name: Exchange connector name (e.g., 'binance_perpetual')
    trading_pair: Trading pair (e.g., ETH-USD) only required for setting leverage
    position_mode: Position mode ('HEDGE' or 'ONE-WAY')
    leverage: Leverage to set (optional, required for HEDGE mode)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_nameYes
connector_nameYes
trading_pairNo
position_modeNo
leverageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description fully explains the tool's behavior: it can set one or both settings depending on provided parameters. It also notes the dependency of trading_pair for leverage and position_mode for HEDGE mode. No contradictions.

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 description is structured with a clear purpose sentence followed by conditional logic and parameter descriptions. It uses a docstring style. While it could be more concise, each sentence adds value and it remains readable.

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 5 parameters, no enums, and no output schema, the description covers all relevant aspects: parameter roles, conditional requirements, and default values. It is fairly complete for an agent to understand when and how to call the tool.

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 0%, so the description must add meaning. It explains defaults (account_name default 'master_account'), valid values for position_mode ('HEDGE' or 'ONE-WAY'), and context for trading_pair and leverage. This goes beyond the raw 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 it sets position mode and leverage for an account on a specific exchange. It also explains conditional behavior (if one param missing, only sets the other), which distinguishes it from any sibling tools that might perform related but different configuration tasks.

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?

The description explains when each parameter is used (e.g., trading_pair only for leverage, position_mode optional) and the conditional logic. However, it does not explicitly compare to alternative tools or provide guidance on when to choose this tool over others.

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