Skip to main content
Glama

SAP Perp Position Info

sap_perp_position_info

Read all open perpetual positions on Adrena for a given wallet address. Returns position key, market, side, size, collateral, entry price, leverage, unrealized PnL, and liquidation price from the on-chain Position account. markPrice mirrors entryPrice until SAP MCP has a live oracle/feed price decoder. Read-only — uses Solana RPC with PDA derivation (works on public RPC without getProgramAccounts).

SAP MCP execution guidance: Intent: SAP MCP tool workflow. Pricing: priced by hosted x402 challenge. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesWallet public key (base58) to read positions for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesMCP content blocks returned to the caller.
isErrorNoTrue when the tool result represents an application-level error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"SAP Perp Position Info input schema. Intent: SAP MCP tool workflow. Pricing: free; call directly without x402. Routing: free hosted call; call directly and keep it small/exact when possible. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. Use exact field names from this schema; do not guess aliases or include private key material."New value: +"SAP Perp Position Info input schema. Intent: SAP MCP tool workflow. Pricing: priced by hosted x402 challenge. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. Use exact field names from this schema; do not guess aliases or include private key material."
  2. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"SAP Perp Position Info input schema. Intent: SAP MCP tool workflow. Pricing: paid read-premium; estimate first, then use sap_payments_call_paid_tool when the runtime cannot replay x402 natively. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. Use exact field names from this schema; do not guess aliases or include private key material."New value: +"SAP Perp Position Info input schema. Intent: SAP MCP tool workflow. Pricing: free; call directly without x402. Routing: free hosted call; call directly and keep it small/exact when possible. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. Use exact field names from this schema; do not guess aliases or include private key material."
  3. Added

TDQS

C2.7/5.0
Behavior1/5

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

Description claims 'Read-only' but annotations set readOnlyHint=false, a direct contradiction. Also idempotentHint=false despite read operations typically being idempotent. No additional behavioral context beyond the contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Contains a large block of generic SAP execution guidance that is not specific to this tool, making it verbose. The tool-specific part is concise but buried in boilerplate.

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 that an output schema exists, the description adequately lists return fields and notes the markPrice limitation. It explains the method (PDA derivation, public RPC). Missing explicit mention of idempotence or error states, but overall sufficient for a read-only query.

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 coverage is 100%, and the description only reiterates that the wallet is used to read positions. No additional semantics beyond what the schema already provides.

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?

Description clearly states it reads all open perpetual positions on Adrena for a wallet, with specific return fields. However, it does not differentiate from the sibling tool adrena_getPositions, which may have similar functionality.

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 vs alternatives like adrena_getPositions. Generic SAP payment routing instructions are present but irrelevant to tool selection.

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.