# api_haystack_execute_swap

Execute an optimized token swap via Haystack Router — gets the best route across multiple DEXes (Tinyman V2, Pact, Folks) and LST protocols, then signs and submits the atomic transaction group using the active wallet account. This is an all-in-one tool: quote → sign → submit → confirm. All amounts are in base units (e.g., 1000000 = 1 ALGO).

Agent View of the PolicyLayer registry record for `api_haystack_execute_swap`. HTML page: https://policylayer.com/tools/goplausible-algorand-mcp/api-haystack-execute-swap

## Facts

- Tool: `api_haystack_execute_swap`
- Server: Algorand MCP (`goplausible/algorand-mcp`) — https://policylayer.com/tools/goplausible-algorand-mcp.md
- Homepage: https://github.com/GoPlausible/algorand-mcp
- Risk category: Financial (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Approval-gated

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "api_haystack_execute_swap",
    "arguments": {}
  }
}
```

## Why api_haystack_execute_swap is rated Critical

This tool executes a real token swap on-chain across DEXes, involving the signing and submission of financial transactions with the user's wallet. It moves crypto assets irreversibly, which qualifies as a Financial action. The all-in-one nature (no separate confirmation step) and use of the active wallet make misuse potentially critical in blast radius.

From the tool's own definition: "Execute an optimized token swap...signs and submits the atomic transaction group using the active wallet account. This is an all-in-one tool: quote → sign → submit → confirm."

## Use case

AI agents use api_haystack_execute_swap to commit financial operations through Algorand MCP, usually the final step of a payment, billing, or trading workflow. A call moves real money.

## Recommended policy (PolicyLayer)

Verdict: **Approval-gated**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Algorand MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "api_haystack_execute_swap": {
      "deny_if": [
        {
          "conditions": [],
          "on_deny": "Requires human approval."
        }
      ]
    }
  }
}
```

## Other tools on Algorand MCP (176)

- `api_ultrade_market_cancel_order` — Destructive — https://policylayer.com/tools/goplausible-algorand-mcp/api-ultrade-market-cancel-order.md
- `api_ultrade_wallet_revoke_key` — Destructive — https://policylayer.com/tools/goplausible-algorand-mcp/api-ultrade-wallet-revoke-key.md
- `make_app_delete_txn` — Destructive — https://policylayer.com/tools/goplausible-algorand-mcp/make-app-delete-txn.md
- `make_asset_destroy_txn` — Destructive — https://policylayer.com/tools/goplausible-algorand-mcp/make-asset-destroy-txn.md
- `wallet_remove_account` — Destructive — https://policylayer.com/tools/goplausible-algorand-mcp/wallet-remove-account.md
- `api_ultrade_wallet_signin` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/api-ultrade-wallet-signin.md
- `assign_group_id` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/assign-group-id.md
- `compile_teal` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/compile-teal.md
- `encode_unsigned_transaction` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/encode-unsigned-transaction.md
- `make_app_call_txn` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/make-app-call-txn.md
- `make_app_clear_txn` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/make-app-clear-txn.md
- `make_app_create_txn` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/make-app-create-txn.md
- `mnemonic_from_seed` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/mnemonic-from-seed.md
- `rekey_account` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/rekey-account.md
- `send_raw_transaction` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/send-raw-transaction.md
- `sign_bytes` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/sign-bytes.md
- `sign_transaction` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/sign-transaction.md
- `simulate_raw_transactions` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/simulate-raw-transactions.md
- `simulate_transactions` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/simulate-transactions.md
- `wallet_sign_data` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/wallet-sign-data.md
- `wallet_sign_transaction` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/wallet-sign-transaction.md
- `wallet_sign_transaction_group` — Execute — https://policylayer.com/tools/goplausible-algorand-mcp/wallet-sign-transaction-group.md
- `alpha_amend_order` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-amend-order.md
- `alpha_cancel_order` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-cancel-order.md
- `alpha_claim` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-claim.md
- `alpha_create_limit_order` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-create-limit-order.md
- `alpha_create_market_order` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-create-market-order.md
- `alpha_merge_shares` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-merge-shares.md
- `alpha_propose_match` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-propose-match.md
- `alpha_split_shares` — Financial — https://policylayer.com/tools/goplausible-algorand-mcp/alpha-split-shares.md
- …and 146 more: https://policylayer.com/tools/goplausible-algorand-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=goplausible-algorand-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/goplausible-algorand-mcp
