Skip to main content
Glama
questflowai

Aster Finance MCP Server

by questflowai

modifyPositionMargin

Adjust margin for isolated cryptocurrency trading positions on Aster Finance to manage risk exposure by adding or reducing collateral.

Instructions

Modify isolated position margin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYes
positionSideNo
symbolYes
typeYes1: Add, 2: Reduce

Implementation Reference

  • The handler case for the 'modifyPositionMargin' tool. It invokes a signed POST request to the Aster Futures API endpoint '/fapi/v1/positionMargin' with the provided arguments.
    case 'modifyPositionMargin':
        return makeRequest('POST', '/fapi/v1/positionMargin', args, true);
  • src/index.ts:422-435 (registration)
    Registration of the 'modifyPositionMargin' tool in the list of available tools, including its description and input schema for validation.
    {
      name: 'modifyPositionMargin',
      description: 'Modify isolated position margin.',
      inputSchema: {
        type: 'object',
        properties: {
          symbol: { type: 'string' },
          positionSide: { type: 'string', enum: ['BOTH', 'LONG', 'SHORT'] },
          amount: { type: 'number' },
          type: { type: 'number', enum: [1, 2], description: '1: Add, 2: Reduce' },
        },
        required: ['symbol', 'amount', 'type'],
      },
    },
  • Input schema defining the parameters for the 'modifyPositionMargin' tool.
    inputSchema: {
      type: 'object',
      properties: {
        symbol: { type: 'string' },
        positionSide: { type: 'string', enum: ['BOTH', 'LONG', 'SHORT'] },
        amount: { type: 'number' },
        type: { type: 'number', enum: [1, 2], description: '1: Add, 2: Reduce' },
      },
      required: ['symbol', 'amount', 'type'],
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Modify' implies a write/mutation operation, but it doesn't disclose critical behavioral traits: whether this requires specific permissions, if it's reversible, potential risks (e.g., liquidation if margin is reduced), rate limits, or what happens on success/failure. For a financial trading tool with zero annotation coverage, this is a significant gap.

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?

Extremely concise - a single sentence with no wasted words. It's front-loaded with the core purpose immediately. Every word earns its place, though this conciseness comes at the cost of completeness.

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

Completeness2/5

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

Given the complexity (financial position margin adjustment), no annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't explain what 'isolated position margin' means, the implications of modification, expected outcomes, or error conditions. For a tool that could affect trading positions and risk, this is inadequate.

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 low at 25% (only 'type' has a description). The description doesn't add any parameter meaning beyond the schema - it doesn't explain what 'symbol', 'amount', 'positionSide', or 'type' represent in context. With low coverage, the description fails to compensate, leaving most parameters semantically unclear. Baseline 3 is generous given the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Modify isolated position margin' states the action (modify) and resource (isolated position margin), but it's vague about what modification entails - it doesn't specify this adjusts collateral/margin for leveraged positions. It distinguishes from siblings like 'setMarginType' or 'setLeverage' by focusing on margin amount adjustment rather than margin configuration, but the distinction isn't explicit.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an open isolated position), when not to use it (e.g., for cross margin), or refer to related tools like 'setMarginType' for margin type changes or 'getPositionInfo' to check current margin. Usage is implied by the name but not explained.

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/questflowai/aster-mcp-server'

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