Skip to main content
Glama
alamedaim-apps

Authorize.net MCP Server

get_transaction_list

Retrieve all transactions from a specific settled batch in Authorize.net to review payment history and analyze settlement data.

Instructions

Get all transactions within a specific settled batch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batchIdYesThe batch ID to retrieve transactions for.

Implementation Reference

  • The primary handler function that implements the 'get_transaction_list' tool logic. It constructs an AuthorizeNet GetTransactionListRequest, authenticates with merchant credentials, executes the API call via a controller, parses the response, handles errors, and returns the list of transactions for the specified batch ID.
    async function getTransactionList(batchId: string) {
      const request = new ApiContracts.GetTransactionListRequest();
      request.setMerchantAuthentication(getMerchantAuth());
      request.setBatchId(batchId);
    
      const ctrl = new ApiControllers.GetTransactionListController(request.getJSON());
      const response = await executeController(ctrl);
    
      const apiResponse = new ApiContracts.GetTransactionListResponse(response);
      if (apiResponse.getMessages().getResultCode() !== ApiContracts.MessageTypeEnum.OK) {
        const errors = apiResponse.getMessages().getMessage();
        throw new Error(`API Error: ${errors[0].getCode()} - ${errors[0].getText()}`);
      }
    
      return apiResponse.getTransactions() || [];
    }
  • The JSON schema definition for the 'get_transaction_list' tool, including name, description, input schema with required 'batchId' property, provided in the ListTools response.
      name: "get_transaction_list",
      description: "Get all transactions within a specific settled batch.",
      inputSchema: {
        type: "object",
        properties: {
          batchId: {
            type: "string",
            description: "The batch ID to retrieve transactions for.",
          },
        },
        required: ["batchId"],
      },
    },
  • src/index.ts:308-310 (registration)
    The registration/dispatch logic in the CallToolRequest handler's switch statement that routes calls to the 'get_transaction_list' tool to the getTransactionList handler function.
    case "get_transaction_list":
      result = await getTransactionList(args?.batchId as string);
      break;
  • Helper function used by the handler to execute AuthorizeNet API controllers asynchronously, handling environment settings and promise resolution.
    function executeController(ctrl: any): Promise<any> {
      return new Promise((resolve, reject) => {
        if (ENVIRONMENT === "production") {
          ctrl.setEnvironment(SDKConstants.endpoint.production);
        }
        ctrl.execute(() => {
          const response = ctrl.getResponse();
          if (response === null) {
            reject(new Error(ctrl.getErrorResponse() || "No response from API"));
          } else {
            resolve(response);
          }
        });
      });
    }
  • Helper function to create the merchant authentication object using environment variables, used in all API requests including getTransactionList.
    function getMerchantAuth() {
      const merchantAuth = new ApiContracts.MerchantAuthenticationType();
      merchantAuth.setName(API_LOGIN_ID);
      merchantAuth.setTransactionKey(TRANSACTION_KEY);
      return merchantAuth;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves transactions but lacks details on permissions, rate limits, pagination, or response format. This is a significant gap for a read operation tool, leaving the agent with incomplete behavioral context.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with zero wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It fails to address key contextual aspects such as what the return values look like (e.g., list format, fields included), error conditions, or how it differs behaviorally from sibling tools, leaving the agent under-informed.

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?

The input schema has 100% description coverage, with the 'batchId' parameter clearly documented. The description adds no additional semantic context beyond implying the batch must be 'settled', which is already suggested by the tool name. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('transactions within a specific settled batch'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_settled_batch_list' (which lists batches) or 'get_transaction_details' (which retrieves details for individual transactions), missing full sibling distinction.

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

Usage Guidelines2/5

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

The description provides minimal guidance by specifying 'within a specific settled batch', implying usage when a batch ID is known. However, it offers no explicit advice on when to use this tool versus alternatives like 'get_unsettled_transaction_list' or 'get_customer_profile_transaction_list', nor any prerequisites or exclusions.

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/alamedaim-apps/authnet-mcp'

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