Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

set-cart-card

Assign a payment card to your shopping cart for streamlined checkout on Terminal.shop. Input the card ID to manage transactions efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIDYes

Implementation Reference

  • The handler function executes the tool logic: sends PUT /cart/card with cardID to terminalApi, returns success or error response.
    async ({ cardID }) => { try { const response = await terminalApi.put("/cart/card", { cardID, }); return { content: [ { type: "text", text: "Successfully set payment method for your cart.", }, ], }; } catch (error) { console.error("Error setting cart payment method:", error); return { content: [ { type: "text", text: `Error setting cart payment method: ${error.message}`, }, ], isError: true, }; } }, );
  • Zod schema defining input: cardID as string.
    { cardID: z.string(), },
  • server.js:654-686 (registration)
    Registration of the 'set-cart-card' tool using server.tool, including name, schema, and handler.
    server.tool( "set-cart-card", { cardID: z.string(), }, async ({ cardID }) => { try { const response = await terminalApi.put("/cart/card", { cardID, }); return { content: [ { type: "text", text: "Successfully set payment method for your cart.", }, ], }; } catch (error) { console.error("Error setting cart payment method:", error); return { content: [ { type: "text", text: `Error setting cart payment method: ${error.message}`, }, ], isError: true, }; } }, );

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/pashaydev/terminal.shop.mcp'

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