unsubscribe_from_webhook
Remove a webhook subscription by specifying its ID to stop receiving notifications from the ShipStation API MCP Server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhookId | Yes | Webhook ID to unsubscribe from |
Implementation Reference
- src/tools/webhook-tools.js:52-64 (handler)The MCP tool handler function for 'unsubscribe_from_webhook'. It takes a webhookId, calls shipStationClient.unsubscribeFromWebhook(webhookId), and returns the JSON-stringified result or error message.handler: async ({ webhookId }) => { try { const result = await shipStationClient.unsubscribeFromWebhook(webhookId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/webhook-tools.js:49-51 (schema)Input schema validation using Zod for the required 'webhookId' parameter (number).schema: { webhookId: z.number().describe("Webhook ID to unsubscribe from") },
- src/tools/webhook-tools.js:46-65 (registration)The tool registration object defining name, description, schema, and handler for 'unsubscribe_from_webhook', part of the webhookTools array exported for MCP server registration.{ name: "unsubscribe_from_webhook", description: "Unsubscribe from a webhook", schema: { webhookId: z.number().describe("Webhook ID to unsubscribe from") }, handler: async ({ webhookId }) => { try { const result = await shipStationClient.unsubscribeFromWebhook(webhookId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } }
- src/api-client.js:199-200 (helper)ShipStationClient helper method that performs the actual API unsubscribe by sending a DELETE request to `/webhooks/${webhookId}`.async unsubscribeFromWebhook(webhookId) { return this.request('DELETE', `/webhooks/${webhookId}`);