Skip to main content
Glama
diaorui

Jupiter Perps MCP Server

by diaorui

close_position

Closes an existing leveraged perpetual futures position at market price on Jupiter Perpetuals, returning collateral as USDC. Specify asset (SOL, BTC, or ETH) and side (Long or Short) to execute.

Instructions

Submits a transaction to fully close an existing position at market price. The protocol processes asynchronously (may take a few seconds) - use get_account_portfolio to verify closure. Returns transaction signature (for logging) and confirmation message. Collateral is returned as USDC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYesThe asset of the position to close
sideYesThe side of the position to close
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the asynchronous processing nature ('may take a few seconds'), the verification method needed, what gets returned ('transaction signature and confirmation message'), and what happens to collateral ('returned as USDC'). This covers important operational aspects beyond basic functionality.

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?

The description is efficiently structured with three sentences that each serve distinct purposes: stating the core action, explaining processing behavior and verification, and describing return values and collateral outcome. There's no wasted text, and important information is front-loaded.

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 mutation tool with no annotations and no output schema, the description does well by explaining the asynchronous nature, verification requirements, return values, and collateral handling. However, it could be more complete by mentioning potential errors, rate limits, or authentication requirements that might be relevant for this financial transaction tool.

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?

With 100% schema description coverage, the input schema already fully documents both parameters (asset and side) with their enums and descriptions. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline expectation but doesn't enhance parameter understanding.

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 specific action ('fully close an existing position at market price') and resource ('position'), distinguishing it from sibling tools like 'open_position' (which creates positions) and 'get_account_portfolio' (which reads positions). It goes beyond just restating the name by specifying the execution method and outcome.

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 provides clear context on when to use this tool ('to fully close an existing position') and explicitly references an alternative tool for verification ('use get_account_portfolio to verify closure'). However, it doesn't explicitly state when NOT to use it or compare it to all possible alternatives among siblings.

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/diaorui/jupiter-perps-mcp'

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