Skip to main content
Glama

Vectorial Data Terminal: Hyperliquid, Polymarket & yield for AI agents

close_position

Destructive

Close an open position (fully or size_pct). Paper executes immediately; live returns typed_data for signing.

Input Schema

NameRequiredDescriptionDefault
marketYesSymbol of the open position, e.g. BTC
size_pctNoPercent of the position to close; omit to close all of it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / market / description
      Added value: +"Symbol of the open position, e.g. BTC"
    • addedInput schema / properties / size_pct / description
      Added value: +"Percent of the position to close; omit to close all of it"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds genuinely new behavior beyond that: paper mode executes immediately while live mode returns typed_data for signing, which is a critical two-step flow an agent must know before calling. It does not cover failure cases (e.g. no such position) or whether partial closes are reversible.

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?

Two short sentences with no wasted words; the operation and its sizing modes come first, followed by the mode-dependent outcome, which is exactly the right front-loading.

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?

For a two-parameter destructive tool with no output schema, the description covers the essential unknowns: what it acts on, sizing, and the divergent paper vs live return path. It stops short of error/precondition behavior and confirmation expectations for an irreversible action.

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 100%, with both market and size_pct already documented including the omit-to-close-all default and the 1-100 range. The description's mention of 'fully or size_pct' merely restates the schema, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb and resource (close an open position) plus the two modes of operation (full vs size_pct). An agent can distinguish it from read tools like get_positions, though it does not explicitly name the nearest siblings such as cancel_order or protect_position.

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?

Invocation context is implied by 'open position' and the paper/live split, which tells the agent something about when execution differs. However, there is no explicit when-not guidance or routing against adjacent tools like cancel_order or protect_position, leaving the agent to infer.

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.