Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

clear-cart

Remove all items from your Terminal.shop shopping cart to start fresh or cancel a planned purchase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler for the clear-cart tool. It sends a DELETE request to /cart via terminalApi, returns a success message if cleared, or an error message if failed.
    server.tool("clear-cart", {}, async () => { try { const response = await terminalApi.delete("/cart"); return { content: [ { type: "text", text: "Your cart has been cleared successfully.", }, ], }; } catch (error) { console.error("Error clearing cart:", error); return { content: [ { type: "text", text: `Error clearing cart: ${error.message}`, }, ], isError: true, }; } });
  • server.js:689-689 (registration)
    Registration of the 'clear-cart' tool using server.tool with empty input schema and inline handler function.
    server.tool("clear-cart", {}, async () => {

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