Skip to main content
Glama

jupiter_perps_positions

Get open perpetual positions for a wallet, including leverage, entry price, PnL, and liquidation price.

Instructions

Get open perpetual positions for a wallet — leverage, entry price, PnL, liquidation price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesWallet address

Implementation Reference

  • Handler function for jupiter_perps_positions — calls client.perpsPositions with the wallet argument and returns JSON result.
      async (args) => {
        const result = await client.perpsPositions(args.wallet);
        return JSON.stringify(result, null, 2);
      },
    );
  • registerPerpsTools function registers jupiter_perps_positions (and jupiter_perps_markets) via the ToolRegistrar callback, wiring schema and handler.
    export function registerPerpsTools(register: ToolRegistrar, client: JupiterClient) {
      register(
        "jupiter_perps_markets",
        "List Jupiter perpetual futures markets — trading pairs, funding rates, open interest.",
        {},
        async () => {
          const result = await client.perpsMarkets();
          return JSON.stringify(result, null, 2);
        },
      );
    
      register(
        "jupiter_perps_positions",
        "Get open perpetual positions for a wallet — leverage, entry price, PnL, liquidation price.",
        {
          wallet: z.string().describe("Wallet address"),
        },
        async (args) => {
          const result = await client.perpsPositions(args.wallet);
          return JSON.stringify(result, null, 2);
        },
      );
    }
  • Input schema for jupiter_perps_positions — requires a 'wallet' string parameter describing the wallet address.
    {
      wallet: z.string().describe("Wallet address"),
    },
  • Client helper method perpsPositions — makes a GET request to /perps/v1/positions with wallet as query parameter.
    async perpsPositions(wallet: string) {
      return this.request("/perps/v1/positions", {
        params: { wallet },
      });
    }
  • src/index.ts:68-69 (registration)
    Top-level registration call that wires registerPerpsTools into the MCP server.
    registerPerpsTools(register, client);
    registerPortfolioTools(register, client);
Behavior3/5

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

No annotations provided. The description indicates a read operation returning positions with specific fields, but does not disclose any additional behavioral traits such as authorization requirements, rate limits, or potential side effects. For a simple read tool without annotations, this is adequate but not exceptional.

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 a single, concise sentence that clearly communicates the tool's purpose and the data it returns (leverage, entry price, PnL, liquidation price). No redundancy or unnecessary words.

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

Completeness5/5

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

Given the simplicity of the tool (one parameter, no output schema, no annotations), the description provides sufficient context. It lists the return fields, which compensates for the absence of an output schema. The description is complete for the tool's scope.

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?

The only parameter 'wallet' is already described in the input schema as 'Wallet address'. The description adds no additional semantic context beyond what the schema provides. Given 100% schema description coverage, a baseline score of 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?

The description clearly states the tool returns open perpetual positions and lists key fields (leverage, entry price, PnL, liquidation price). This distinguishes it from siblings like jupiter_perps_markets (which lists markets) and jupiter_portfolio (broader portfolio info).

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?

No explicit guidance on when to use this tool versus alternatives like jupiter_portfolio or jupiter_perps_markets. The context implies use when needing open positions for a specific wallet, but no exclusions or conditions are mentioned.

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

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