delete-address
Remove a shipping or billing address from your Terminal.shop account by specifying its unique ID. This tool helps manage your account details by deleting stored address information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressId | Yes |
Implementation Reference
- server.js:903-926 (handler)The core handler function for the 'delete-address' tool. It takes an addressId, calls terminalApi.delete to remove the address, and returns a success message or an error response with isError flag.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)The input schema using Zod (z.string()) for the required 'addressId' parameter.{ addressId: z.string(), },
- server.js:898-927 (registration)The server.tool() call that registers the 'delete-address' tool with its name, schema, and inline 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, }; } }, );