Skip to main content
Glama
zakblacki

Satim Payment Gateway Integration

by zakblacki

confirm_order

Verify and confirm the status of an order after a payment attempt using the Satim Payment Gateway Integration. Processes order ID and language preferences to ensure accurate transaction tracking and response.

Instructions

Confirm order status after payment attempt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage for response messages
orderIdYesOrder ID returned from registration

Implementation Reference

  • MCP CallTool handler for 'confirm_order': validates credentials, calls SatimPaymentGateway.confirmOrder, and returns JSON stringified response.
    case "confirm_order":
      if (!satimGateway) {
        throw new McpError(ErrorCode.InvalidRequest, "Credentials not configured. Use configure_credentials first.");
      }
    
      const confirmationResponse = await satimGateway.confirmOrder({
        orderId: args.orderId as string,
        language: args.language as 'AR' | 'FR' | 'EN'
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(confirmationResponse, null, 2)
          }
        ]
      };
  • Input schema and registration of the 'confirm_order' tool in listTools response.
      name: "confirm_order",
      description: "Confirm order status after payment attempt",
      inputSchema: {
        type: "object",
        properties: {
          orderId: {
            type: "string",
            description: "Order ID returned from registration"
          },
          language: {
            type: "string",
            enum: ["AR", "FR", "EN"],
            description: "Language for response messages"
          }
        },
        required: ["orderId"]
      }
    },
  • Core helper method SatimPaymentGateway.confirmOrder that performs HTTP GET to SATIM API endpoint /confirmOrder.do with credentials and orderId.
    async confirmOrder(params: OrderConfirmationParams): Promise<OrderConfirmationResponse> {
      try {
        const queryParams = new URLSearchParams({
          userName: this.credentials.userName,
          password: this.credentials.password,
          orderId: params.orderId,
          ...(params.language && { language: params.language })
        });
    
        const response = await axios.get(`${this.baseUrl}/confirmOrder.do?${queryParams}`);
        return response.data;
      } catch (error) {
        throw new Error(`Order confirmation failed: ${error}`);
      }
    }
  • TypeScript interface defining input parameters for confirmOrder, matching the tool inputSchema.
    interface OrderConfirmationParams {
      orderId: string;
      language?: 'AR' | 'FR' | 'EN';
    }
  • TypeScript interface defining the expected response structure from SATIM confirmOrder API.
    interface OrderConfirmationResponse {
      orderNumber?: string;
      actionCode?: number;
      actionCodeDescription?: string;
      amount?: number;
      errorCode?: string;
      errorMessage?: string;
      orderStatus?: number;
      approvalCode?: string;
      authCode?: number;
      cardholderName?: string;
      depositAmount?: number;
      currency?: string;
      pan?: string;
      ip?: string;
      params?: {
        respCode?: string;
        respCode_desc?: string;
        udf1?: string;
        udf2?: string;
        udf3?: string;
        udf4?: string;
        udf5?: string;
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'confirm order status', which suggests a read operation, but doesn't clarify if this is a safe query, requires specific permissions, has side effects, or details response behavior. This is inadequate for a tool with zero annotation coverage.

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's appropriately sized and front-loaded, making it easy to understand quickly with zero waste.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'confirm' entails behaviorally, what the return values might be, or how it fits with sibling tools. For a tool with 2 parameters and potential complexity in order processing, more context is needed to be fully helpful.

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 schema description coverage is 100%, so the input schema already documents both parameters ('orderId' and 'language') with descriptions and enum values. The description adds no additional meaning beyond what the schema provides, such as explaining parameter interactions or usage context, but this is acceptable given the high schema coverage.

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

Purpose3/5

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

The description states the tool's purpose as 'Confirm order status after payment attempt', which includes a specific verb ('Confirm') and resource ('order status'), but it's somewhat vague about what 'confirm' entails—does it check, update, or finalize status? It doesn't clearly distinguish from siblings like 'validate_payment_response', which might overlap in functionality.

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 mentioning 'after payment attempt', implying usage timing, but it doesn't specify when to use this tool versus alternatives like 'validate_payment_response' or 'register_order'. No explicit when-not-to-use or prerequisite information is given, leaving gaps in usage context.

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

Related 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/zakblacki/Satim-Payment-Gateway-Integration'

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