Skip to main content
Glama

bags_execute_trade

Swap tokens on Bags pools (requires $BOS) using a two-step confirmation: first call previews the trade and returns a confirmation token; second call signs and submits the on-chain swap.

Instructions

GATED WRITE: Swap tokens on Bags pools. Requires $BOS. Two-step: the first call returns a preview and a confirmation token; call again with that token to sign and submit. Returns a confirmed on-chain signature. SOL mint: So11111111111111111111111111111111111111112.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoAmount of the input token, human-readable (e.g. 0.1 SOL). Default: 0.1
confirmNoConfirmation token from the preview call. Omit on the first call.
inputMintNoInput token mint. Defaults to SOL: So11111111111111111111111111111111111111112
outputMintNoOutput token mint. Defaults to BOS: EkJuyYyD3to61CHVPJn6wHb7xANxvqApnVJ4o2SdBAGS
slippageBpsNoAllowed slippage in basis points. Default 300 (3%).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.6.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that this is a gated write, requires $BOS, returns a preview and confirmation token on the first call, and submits an on-chain signature on the second call. This gives agents a solid picture of the tool's side effects and flow, though it does not cover failure modes or what happens if the gate requirements are unmet.

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 compact and front-loaded with the operation type and resource. The SOL mint note is slightly redundant with the schema, but the overall structure is efficient and scannable.

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 and lack of annotations/output schema, the description covers the essential non-obvious aspects: gating, $BOS requirement, two-step confirmation flow, and final on-chain signature. It does not explain error cases or the exact preview payload, but the core invocation knowledge is present.

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 description coverage is 100%, so the baseline is 3. The description adds minor reinforcing detail about the SOL mint and the confirm token's role, but most parameter meaning is already present in the schema.

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 opens with 'GATED WRITE: Swap tokens on Bags pools', giving a specific verb and resource and explicitly positioning this as the execution counterpart to read/quote tools. It clearly distinguishes itself from siblings like bags_get_trade_quote and claim/read tools.

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

Usage Guidelines4/5

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

It explains the two-step invocation flow and the $BOS requirement, which is essential for using the tool correctly. It does not explicitly say 'use this only after a quote' or contrast with alternative tools, but the write-vs-read distinction and two-step protocol make the main usage context clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/edycutjong/BagOS'

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