Skip to main content
Glama
clawallex

Clawallex MCP Server

by clawallex

get_card_details

Retrieve virtual card information including masked number, expiry, balance, holder details, and encrypted sensitive data for secure online checkout form filling.

Instructions

Get full card details including masked PAN, expiry, balance, cardholder info, billing address, risk controls, and encrypted sensitive data. Returns: masked_pan, expiry, balance, status, first_name, last_name, delivery_address, tx_limit, allowed_mcc, blocked_mcc, encrypted_sensitive_data. The encrypted_sensitive_data field contains PAN and CVV encrypted with AES-256-GCM. To decrypt, use the decrypt_card_data tool with the encrypted_sensitive_data object. Only cards created by this agent (same client_id) are accessible. IMPORTANT: Never display the decrypted PAN or CVV to the user. Use them only for filling checkout forms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYesCard ID, e.g. 'c_123'

Implementation Reference

  • Implementation of the `get_card_details` MCP tool, which fetches full virtual card details including masked PAN, expiry, and encrypted sensitive data.
    server.tool(
      "get_card_details",
      [
        "Get full card details including masked PAN, expiry, balance, cardholder info, billing address, risk controls, and encrypted sensitive data.",
        "Returns: masked_pan, expiry, balance, status, first_name, last_name, delivery_address, tx_limit, allowed_mcc, blocked_mcc, encrypted_sensitive_data.",
        "The encrypted_sensitive_data field contains PAN and CVV encrypted with AES-256-GCM.",
        "To decrypt, use the decrypt_card_data tool with the encrypted_sensitive_data object.",
        "Only cards created by this agent (same client_id) are accessible.",
        "IMPORTANT: Never display the decrypted PAN or CVV to the user. Use them only for filling checkout forms.",
      ].join(" "),
      { card_id: z.string().describe("Card ID, e.g. 'c_123'") },
      async ({ card_id }) => {
        try {
          const result = await client.get<Record<string, unknown>>(`/payment/cards/${card_id}/details`);
          if (!result.encrypted_sensitive_data) {
            return toolOk({
              ...result,
              _hint: "encrypted_sensitive_data is null. Possible reasons: (1) issuer did not return sensitive data for this card, (2) environment has sensitive data disabled, (3) insufficient permissions. Check card status and contact support if needed.",
            });
          }
          return toolOk({
            ...result,
            _hint: "Use decrypt_card_data with the encrypted_sensitive_data to get PAN and CVV for checkout. NEVER display the decrypted card number or CVV to the user.",
          });
        } catch (err) {
          return toolError(err);
        }
      },
    );
Behavior5/5

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

With no annotations provided, the description carries full disclosure burden: it explains AES-256-GCM encryption, access control boundaries (same client_id only), security constraints (never display sensitive data), and the two-step retrieval/decryption workflow.

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?

Front-loaded with specific action and resource list; each subsequent sentence adds critical behavioral, security, or workflow information. The return field list is justified given no output schema exists.

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

Completeness5/5

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

Comprehensive coverage of return values (compensating for missing output schema), encryption method, decryption prerequisites, access controls, and security protocols appropriate for sensitive financial data handling.

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

Parameters4/5

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

Schema coverage is 100% with clear card_id description. The description adds value by constraining valid inputs ('Only cards created by this agent are accessible'), providing semantic context about authorization not present in the schema.

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?

Description explicitly states 'Get full card details' and lists specific resources (masked PAN, expiry, balance, etc.), clearly distinguishing this from sibling tools like get_card_balance (single field) and list_cards (summary view).

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

Usage Guidelines5/5

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

Explicitly references sibling tool decrypt_card_data for decryption workflow ('To decrypt, use the decrypt_card_data tool'), states access constraints ('Only cards created by this agent'), and provides critical security exclusions ('Never display the decrypted PAN or CVV').

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

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