Skip to main content
Glama
dragonkhoi

Ramp MCP

get_credit_card_transactions

Retrieve Ramp credit card transaction data for analysis, filtering by date, amount, merchant, or other parameters to track spending and manage finances.

Instructions

Retrieve information about your Ramp credit card transactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sk_category_idNo
department_idNo
limit_idNo
location_idNo
merchant_idNo
card_idNo
statement_idNo
stateNo
user_idNo
sync_readyNo
from_dateNo
to_dateNo
synced_afterNo
min_amountNo
has_no_sync_commitsNo
max_amountNo
trip_idNo
entity_idNo
requires_memoNo
include_merchant_dataNo
order_by_amount_ascNo
order_by_amount_descNo
order_by_date_ascNo
order_by_date_descNo
startNo
page_sizeNo

Implementation Reference

  • The handler function that constructs the Ramp API URL with input parameters, authenticates using the context's accessToken, fetches transactions, and returns the JSON response or throws an error.
    handler: async (input, context) => {
      // Build URL with query parameters
      const url = new URL("https://api.ramp.com/developer/v1/transactions");
      
      // Add query parameters if provided
      Object.entries(input).forEach(([key, value]) => {
        if (value !== undefined) {
          url.searchParams.append(key, String(value));
        }
      });
    
      // Set up request options
      const options = {
        method: "GET",
        headers: {
          accept: "application/json",
          authorization: `Bearer ${context.accessToken}`,
        },
      };
    
      // Make the API request
      const response = await fetch(url.toString(), options);
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(
          `HTTP error! status: ${response.status} - ${errorText}`
        );
      }
    
      const data = await response.json();
      return data;
    },
  • Zod input schema defining optional parameters for filtering and paginating Ramp credit card transactions, such as dates, amounts, IDs, and sorting options.
    inputSchema: {
      sk_category_id: z.string().optional(),
      department_id: z.string().uuid().optional(),
      limit_id: z.string().uuid().optional(),
      location_id: z.string().uuid().optional(), 
      merchant_id: z.string().uuid().optional(),
      card_id: z.string().uuid().optional(),
      statement_id: z.string().uuid().optional(),
      state: z.string().optional(),
      user_id: z.string().uuid().optional(),
      sync_ready: z.boolean().optional(),
      from_date: z.string().datetime().optional(),
      to_date: z.string().datetime().optional(),
      synced_after: z.string().datetime().optional(),
      min_amount: z.union([z.string(), z.number()]).optional(),
      has_no_sync_commits: z.boolean().optional(),
      max_amount: z.union([z.string(), z.number()]).optional(),
      trip_id: z.string().uuid().optional(),
      entity_id: z.string().uuid().optional(),
      requires_memo: z.boolean().optional(),
      include_merchant_data: z.boolean().optional(),
      order_by_amount_asc: z.boolean().optional(),
      order_by_amount_desc: z.boolean().optional(), 
      order_by_date_asc: z.boolean().optional(),
      order_by_date_desc: z.boolean().optional(),
      start: z.string().optional(),
      page_size: z.number().optional()
    },
  • src/index.ts:48-53 (registration)
    Registration of the tool with the MCP server using server.tool(), providing name, description, inputSchema, and handler from the context-enhanced tool instance.
    server.tool(
      transactionsTool.name,
      transactionsTool.description,
      transactionsTool.inputSchema,
      transactionsTool.handler
    );
  • src/index.ts:44-44 (registration)
    Enhances the tool with Ramp context (accessToken) using withContext before registration.
    const transactionsTool = GET_CREDIT_CARD_TRANSACTIONS_TOOL.withContext(rampContext);
  • Type definition for the RampContext used by the tool, extending ToolContext with accessToken.
    export interface RampContext extends ToolContext {
      accessToken: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a retrieval operation but provides no information about authentication requirements, rate limits, pagination behavior (despite having 'start' and 'page_size' parameters), error conditions, or what format the returned information takes. This leaves significant behavioral unknowns for a tool with 26 parameters.

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, clear sentence that efficiently communicates the core purpose without unnecessary words. It's appropriately sized for a tool description and front-loads the essential information about what the tool does.

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 high complexity (26 parameters), no annotations, no output schema, and 0% schema description coverage, the description is woefully incomplete. It doesn't address what information is returned, how to use the extensive filtering parameters, pagination behavior, or any constraints. For such a complex tool, the minimal description leaves too many questions unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 26 parameters, the description provides no semantic information about any parameters. It doesn't explain what filtering capabilities exist, what the various ID parameters represent, or how date ranges work. The description fails to compensate for the complete lack of schema documentation.

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 ('Retrieve information') and resource ('Ramp credit card transactions'), making the purpose immediately understandable. It distinguishes from the sibling 'get_ramp_statements' by specifying transactions rather than statements. However, it doesn't specify the scope or format of the retrieved information, keeping it from a perfect score.

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 no guidance on when to use this tool versus alternatives, nor any context about prerequisites or constraints. With 26 optional parameters and a sibling tool for statements, the lack of usage guidance leaves the agent to guess when this specific transaction retrieval tool is appropriate.

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/dragonkhoi/ramp-mcp'

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