sap adrena build close short
sap_adrena_build_close_shortBuild an unsigned transaction to close a short perp position on Adrena. Returns transactionBase64 only after builder-side RPC simulation passes. Show approval only when safeToApprove=true and approvalBlocked=false; otherwise do not call finalize.
SAP MCP execution guidance: Intent: hosted unsigned transaction builder. Pricing: paid builder; estimate first, then pay/build and finalize unsigned transactions locally when returned. 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"principalToken": "<principalToken>",
"collateralToken": "<collateralToken>"
},
"name": "sap_adrena_build_close_short"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Position owner wallet public key (base58). | |
| priceUsd | No | Optional close price in USD. | |
| percentage | No | Percentage to close (0-1000000). Default 1000000. | |
| principalToken | Yes | Asset of the position. | |
| collateralToken | Yes | Collateral token. USDC for shorts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | MCP content blocks returned to the caller. | |
| isError | No | True when the tool result represents an application-level error. |