delete-address
Remove stored addresses from Terminal.shop MCP Server by providing the address ID, streamlining address management for users and AI assistants.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressId | Yes |
Implementation Reference
- server.js:903-926 (handler)The async handler function that performs the deletion of the address using terminalApi.delete and returns a success or error response.async ({ addressId }) => { try { await terminalApi.delete(`/address/${addressId}`); return { content: [ { type: "text", text: `Address deleted successfully`, }, ], }; } catch (error) { console.error(`Error deleting address ${addressId}:`, error); return { content: [ { type: "text", text: `Error deleting address: ${error.message}`, }, ], isError: true, }; } },
- server.js:900-902 (schema)Zod schema defining the input parameter 'addressId' as a string.{ addressId: z.string(), },
- server.js:898-927 (registration)The server.tool call that registers the 'delete-address' tool with its schema and handler function.server.tool( "delete-address", { addressId: z.string(), }, async ({ addressId }) => { try { await terminalApi.delete(`/address/${addressId}`); return { content: [ { type: "text", text: `Address deleted successfully`, }, ], }; } catch (error) { console.error(`Error deleting address ${addressId}:`, error); return { content: [ { type: "text", text: `Error deleting address: ${error.message}`, }, ], isError: true, }; } }, );