Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

clear-cart

Remove all items from your shopping cart on Terminal.shop, ensuring a clean slate for new purchases. Ideal for resetting or reorganizing your order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'clear-cart' tool, registered inline. It sends a DELETE request to '/cart' using terminalApi, returns a success message on completion, or an error message if the request fails.
    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-713 (registration)
    Registers the 'clear-cart' tool with an empty input schema and an inline asynchronous handler function.
    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, }; } });

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