Skip to main content
Glama
pexcard

PEX MCP Server

by pexcard

pex_get_all_cardholder_transactions

Retrieve paginated cardholder transaction records within a specified date range, with options to include pending or declined transactions.

Instructions

Get all cardholder transactions within a date range. Results are paginated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date (ISO 8601)
endDateYesEnd date (ISO 8601)
includePendingsNoInclude pending transactions
includeDeclinesNoInclude declined transactions
pageNoPage number (1-based, default: 1)
pageSizeNoResults per page (default: 50, max: 100)

Implementation Reference

  • The handler for 'pex_get_all_cardholder_transactions' is registered in src/tools/details.ts. It fetches data from the PEX API and returns a paginated response.
    server.registerTool(
      "pex_get_all_cardholder_transactions",
      {
        description: "Get all cardholder transactions within a date range. Results are paginated.",
        inputSchema: {
          startDate: z.string().describe("Start date (ISO 8601)"),
          endDate: z.string().describe("End date (ISO 8601)"),
          includePendings: z.boolean().optional().describe("Include pending transactions"),
          includeDeclines: z.boolean().optional().describe("Include declined transactions"),
          page: z.number().optional().default(1).describe("Page number (1-based, default: 1)"),
          pageSize: z.number().optional().default(50).describe("Results per page (default: 50, max: 100)"),
        },
      },
      async ({ startDate, endDate, includePendings, includeDeclines, page, pageSize }) => {
        try {
          const result = await client.get("/Details/AllCardholderTransactions", {
            StartDate: startDate,
            EndDate: endDate,
            IncludePendings: includePendings,
            IncludeDeclines: includeDeclines,
          });
          const paginated = paginateNestedArray(
            result as Record<string, unknown>,
            "TransactionList",
            { page, pageSize }
          );
          return toolResponse(paginated);
        } catch (error) {
          return toolError(error);
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It successfully notes that 'Results are paginated,' which is critical for API consumption. However, it lacks other important behavioral context such as maximum date range limits, rate limiting, data retention policies, or whether this retrieves transactions across all cardholders or requires specific authorization scopes.

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 consists of two efficient sentences: the first establishes the core purpose and the second discloses the pagination behavior. There is no redundant or wasted text; every word serves a functional purpose for the agent's understanding.

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

Completeness3/5

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

Given the 100% schema coverage and lack of output schema, the description provides the minimum necessary context (pagination) for a bulk-list operation. However, it fails to address the specific differentiation from similar sibling tools or operational constraints (e.g., maximum lookback periods), leaving gaps that could lead to incorrect tool selection.

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%, documenting all six parameters including date formats and pagination controls. The description text mentions 'within a date range,' which aligns with the required parameters, but adds no additional semantic value regarding parameter relationships, constraints, or syntax beyond what the schema already provides. Baseline 3 is appropriate for high-coverage schemas.

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 verb (Get), resource (cardholder transactions), and primary scope (within a date range). However, while it uses 'Get all' to suggest bulk retrieval, it does not clearly distinguish from the similar sibling tool 'pex_get_cardholder_transactions' (without 'all'), leaving ambiguity about the specific use case for this variant versus the standard plural version.

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 mentions pagination behavior but provides no guidance on when to select this tool versus alternatives like 'pex_get_cardholder_transactions' (non-'all' version) or 'pex_get_cardholder_purchases'. There are no explicit when-to-use criteria, prerequisites, or exclusions mentioned despite the crowded sibling namespace.

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/pexcard/mcp'

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