Skip to main content
Glama
OOBE-PROTOCOL

SAP MCP Server

magicblock swap

magicblock_swap
Destructive

Constructs an unsigned swap transaction from a quote, with public Jupiter routing or private scheduled transfer with configurable delay and split.

Instructions

Build an unsigned swap transaction from a quote. 'public' mode passes through Jupiter. 'private' mode routes output through scheduled private transfer with delay and split, requires destination, and currently rejects wSOL output because live mainnet testing found stuck-fund risk in MagicBlock shuttle delivery. Agents must continue with sap_preview_transaction, sap_sign_transaction, and sap_submit_signed_transaction; never write temporary signing scripts or read keypair JSON. Value-action fee applies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
splitNoPrivate only. Number of queue entries to split across (1-14)
validatorNoOptional validator pubkey for the transfer-queue PDA
maxDelayMsNoPrivate only. Latest (ms) the queued transfer may settle (<= 600000)
minDelayMsNoPrivate only. Earliest (ms) the queued transfer may settle
visibilityNo'public' = transparent Jupiter pass-through, 'private' = output routed through scheduled private transfer
clientRefIdNoPrivate only. Optional u64 client correlation ID
destinationNoFinal private-transfer recipient (required when visibility='private')
quoteResponseYesQuote response object from magicblock_swapQuote (pass as-is)
userPublicKeyYesWallet that will sign the swap transaction
wrapAndUnwrapSolNoAuto wrap/unwrap native SOL when needed (default true)
asLegacyTransactionNoBuild a legacy transaction (not allowed when visibility=private, default false)

Output Schema

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

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

Beyond annotations (destructiveHint=true, etc.), the description adds crucial behavioral context: the transaction is unsigned, private mode has stuck-fund risk with wSOL, and the tool applies a value-action fee. It also warns against insecure practices, providing comprehensive transparency.

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

Conciseness4/5

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

The description is concise and front-loaded with the core purpose. It packs essential information in four sentences without fluff, though it could arguably be slightly more streamlined by separating workflow instructions.

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 the tool's complexity (11 parameters, nested objects, output schema), the description adequately covers modes, risks, and workflow. It does not detail the output schema, but that is provided separately, and the description fulfills its role of adding contextual completeness.

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% so all parameters have descriptions. The tool description adds high-level context (e.g., mode explanation) but does not significantly enhance parameter semantics beyond what the schema already provides, meriting a baseline score of 3.

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 builds an unsigned swap transaction from a quote, distinguishes between public and private modes, and explicitly instructs agents on the required follow-up steps, differentiating it from sibling tools like jupiter_swap and magicblock_swapQuote.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use (building from quote), mode selection (public vs private), and what not to do (never write temporary signing scripts or read keypair JSON). Also lists required continuation tools (sap_preview_transaction, etc.) and mentions the value-action fee.

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