Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

list_crypto_transactions

Retrieve and display cryptocurrency transaction history from Bitpanda, including buys, sells, deposits, withdrawals, transfers, refunds, and ICOs with paginated results.

Instructions

Lists all user's crypto transactions from the Bitpanda API. Newest crypto transactions come first. Response is cursor paginated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoOne of `buy`, `sell`, `deposit`, `withdrawal`, `transfer`, `refund` or `ico`.
statusNoOne of `pending`, `processing`, `unconfirmed_transaction_out`, `open_invitation`, `finished` or `canceled`.
cursorNoId of the last known crypto transaction by the client. Only crypto transactions after this id are returned. Empty or missing cursor parameter will return crypto transactions from the start.
page_sizeNoSize of a page for the paginated response

Implementation Reference

  • The main handler function that executes the logic for the 'list_crypto_transactions' tool by querying the Bitpanda API for crypto transactions based on input parameters like type, status, cursor, and page_size.
    const listCryptoTransactionsHandler = async (input: Input): Promise<Output> => {
      try {
        const apiKey = getBitpandaApiKey();
        const url = `${BITPANDA_API_BASE_URL}/wallets/transactions`;
    
        const params: any = {}; // Use any for now, refine later if needed
        if (input.type) {
          params.type = input.type;
        }
        if (input.status) {
          params.status = input.status;
        }
        if (input.cursor) {
          params.cursor = input.cursor;
        }
        if (input.page_size) {
          params.page_size = input.page_size;
        }
    
        const response = await axios.get<Output>(url, {
          headers: {
            'X-Api-Key': apiKey,
            'Content-Type': 'application/json',
          },
          params,
        });
    
        // Return the data received from the Bitpanda API
        return response.data;
      } catch (error: unknown) {
        console.error('Error fetching Bitpanda crypto transactions:', error);
        const message =
          error instanceof Error ? error.message : 'An unknown error occurred while fetching crypto transactions.';
        // Re-throwing the error to be handled by the MCP server framework
        throw new Error(`Failed to fetch Bitpanda crypto transactions: ${message}`);
      }
    };
  • Input schema definition using Zod for validating parameters: type, status, cursor, page_size for the list_crypto_transactions tool.
    // Define the input schema shape for the list_crypto_transactions tool
    const listCryptoTransactionsInputSchemaShape = {
      type: z
        .enum(['buy', 'sell', 'deposit', 'withdrawal', 'transfer', 'refund', 'ico'])
        .optional()
        .describe('One of `buy`, `sell`, `deposit`, `withdrawal`, `transfer`, `refund` or `ico`.'),
      status: z
        .enum(['pending', 'processing', 'unconfirmed_transaction_out', 'open_invitation', 'finished', 'canceled'])
        .optional()
        .describe(
          'One of `pending`, `processing`, `unconfirmed_transaction_out`, `open_invitation`, `finished` or `canceled`.'
        ),
      cursor: z
        .string()
        .optional()
        .describe(
          'Id of the last known crypto transaction by the client. Only crypto transactions after this id are returned. Empty or missing cursor parameter will return crypto transactions from the start.'
        ),
      page_size: z.number().int().positive().optional().describe('Size of a page for the paginated response'),
    };
  • Tool definition export that bundles the name, description, input schema, and handler for the list_crypto_transactions tool.
    // Export the tool definition for list_crypto_transactions
    export const listCryptoTransactionsTool: BitpandaToolDefinition = {
      name: 'list_crypto_transactions',
      description:
        "Lists all user's crypto transactions from the Bitpanda API. Newest crypto transactions come first. Response is cursor paginated.",
      inputSchemaShape: listCryptoTransactionsInputSchemaShape,
      handler: listCryptoTransactionsHandler,
    };
  • The tools array that includes the listCryptoTransactionsTool for registration to the MCP server.
    const bitpandaToolDefinitions: BitpandaToolDefinition[] = [
      listTradesTool, // Add the listTradesTool to the array
      listAssetWalletsTool, // Add the listAssetWalletsTool to the array
      listFiatWalletsTool, // Add the listFiatWalletsTool to the array
      listFiatTransactionsTool, // Add the listFiatTransactionsTool to the array
      listCryptoWalletsTool, // Add the listCryptoWalletsTool to the array
      listCryptoTransactionsTool, // Add the listCryptoTransactionsTool to the array
      listCommodityTransactionsTool, // Add the listCommodityTransactionsTool to the array
      assetInfoTool, // Add the assetInfoTool to the array
      // ohlcTool, // Add the ohlcTool to the array
      // Other tools will be added here as they are implemented
    ];
  • The registration function that loops over tool definitions, including list_crypto_transactions, and calls server.tool() to register them with the MCP server.
    /**
     * Registers all Bitpanda tools with the MCP server.
     * @param server The McpServer instance.
     */
    export const registerBitpandaTools = (server: McpServer): void => {
      bitpandaToolDefinitions.forEach((toolDef) => {
        try {
          // Pass the raw shape to the inputSchema parameter, assuming SDK handles z.object()
          server.tool(toolDef.name, toolDef.description, toolDef.inputSchemaShape, async (input) => {
            const result = await toolDef.handler(input);
            // Assuming the handler returns the data directly, wrap it in the MCP content format
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
          });
          console.log(`Registered Bitpanda tool: ${toolDef.name}`);
        } catch (error) {
          console.error(`Failed to register tool ${toolDef.name}:`, error);
        }
      });
    };
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: ordering ('Newest crypto transactions come first'), pagination method ('cursor paginated'), and that it's a read operation (implied by 'Lists'). However, it lacks details on rate limits, authentication needs, or error handling.

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

Conciseness5/5

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

The description is efficiently structured in three concise sentences with zero waste: states purpose, ordering, and pagination method. Each sentence adds essential information, making it front-loaded and appropriately sized for the tool's complexity.

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 no annotations and no output schema, the description provides good context on behavior (ordering, pagination) but lacks details on response format, error cases, or authentication. It's mostly complete for a list operation but could be enhanced with output expectations.

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%, providing full documentation of all 4 parameters. The description adds no parameter-specific information beyond what the schema already states, so it meets the baseline of 3 without compensating with additional semantic context.

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 verb ('Lists') and resource ('all user's crypto transactions from the Bitpanda API'), distinguishing it from siblings like list_fiat_transactions, list_commodity_transactions, and list_trades by specifying crypto transactions. It provides specific scope and data source.

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

Usage Guidelines3/5

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

The description implies usage for retrieving crypto transactions, but does not explicitly state when to use this tool versus alternatives like list_fiat_transactions or list_trades. No exclusions or prerequisites are mentioned, leaving usage context somewhat vague.

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/matteoantoci/mcp-bitpanda'

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