Skip to main content
Glama
OOBE-PROTOCOL

SAP MCP Server

Adrena Close Position

adrena_closePosition
Destructive

Close an active perpetual position on Adrena Protocol by providing a Solana wallet and position key. This terminates the position and settles funds.

Instructions

Close a perpetual position on Adrena Protocol. SAP MCP context: This Synapse AgentKit tool is served beside the sap_* SDK tools. Use sap_register_agent, sap_update_agent, and sap_publish_tool_by_name when the capability should become part of an on-chain SAP agent profile or tool registry entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana public key (base58)
positionKeyYesSolana public key (base58)

Output Schema

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

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, meaning the tool modifies state and can destroy value. However, the description adds no additional behavioral context—e.g., what happens to collateral, fees, or realized PnL. It does not explain the consequences of closing a position, which is critical for a destructive action. The description fails to enhance understanding beyond the annotations.

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

Conciseness3/5

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

The core purpose is in the first sentence, which is concise. However, the second paragraph about SAP MCP context is lengthy and tangential, adding unnecessary verbosity. The description could be halved without losing essential information. It is not optimally concise for an AI agent's quick comprehension.

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 that the tool is destructive and has an output schema, the description should explain return values, side effects, and prerequisites. It does not mention what happens after closing (e.g., position removed, funds returned). The absence of this information makes it incomplete for an agent to fully understand the action's implications, especially compared to the richer descriptions in calibration examples.

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 input schema covers both parameters (wallet, positionKey) with descriptions ('Solana public key (base58)'), achieving 100% schema description coverage. The tool description does not add further semantic information about these parameters, but the baseline score of 3 is appropriate since the schema already provides adequate meaning.

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?

The description opens with 'Close a perpetual position on Adrena Protocol,' clearly stating the verb (close), resource (perpetual position), and protocol (Adrena). This distinguishes it from sibling tools like adrena_openPosition or adrena_addCollateral. However, the subsequent SAP context paragraph is not directly related to the tool's purpose and may distract, but the core purpose is clearly communicated.

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?

The description provides no guidance on when to use this tool versus alternatives (e.g., other Adrena tools). It mentions using sap_register_agent etc. for SAP registration, but that is unrelated to closing a position. There is no discussion of prerequisites, such as requiring an open position or ownership by the wallet, leaving the agent without clear selection criteria.

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/OOBE-PROTOCOL/sap-mcp'

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