Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

create-address

Add a new shipping or billing address to your Terminal.shop account by providing required details like name, street, city, country, and postal code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
street1Yes
street2No
cityYes
provinceNo
countryYes
zipYes
phoneNo

Implementation Reference

  • The handler function that executes the create-address tool logic: posts address details to the /address API endpoint, returns success message with address ID or error.
    async (params) => { try { const response = await terminalApi.post("/address", params); const addressID = response.data.data; return { content: [ { type: "text", text: `Address created successfully! Address ID: ${addressID}`, }, ], }; } catch (error) { console.error("Error creating address:", error); return { content: [ { type: "text", text: `Error creating address: ${error.message}`, }, ], isError: true, }; } }, );
  • Zod schema defining the input parameters for the create-address tool: name, street1, street2 (optional), city, province (optional), country (2-letter), zip, phone (optional).
    { name: z.string(), street1: z.string(), street2: z.string().optional(), city: z.string(), province: z.string().optional(), country: z.string().length(2), zip: z.string(), phone: z.string().optional(), },
  • server.js:857-895 (registration)
    Registration of the create-address tool using server.tool, including name, input schema, and inline handler function.
    server.tool( "create-address", { name: z.string(), street1: z.string(), street2: z.string().optional(), city: z.string(), province: z.string().optional(), country: z.string().length(2), zip: z.string(), phone: z.string().optional(), }, async (params) => { try { const response = await terminalApi.post("/address", params); const addressID = response.data.data; return { content: [ { type: "text", text: `Address created successfully! Address ID: ${addressID}`, }, ], }; } catch (error) { console.error("Error creating address:", error); return { content: [ { type: "text", text: `Error creating address: ${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