unsubscribe_from_webhook
Remove a webhook subscription in ShipStation to stop receiving automated notifications for specific events.
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 for 'unsubscribe_from_webhook'. It calls shipStationClient.unsubscribeFromWebhook and returns the JSON 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)Zod schema defining the input parameter 'webhookId' as a number.schema: { webhookId: z.number().describe("Webhook ID to unsubscribe from") },
- src/tools/webhook-tools.js:46-65 (registration)The tool registration object including name, description, schema, and handler reference within the webhookTools array.{ 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-201 (helper)ShipStationClient helper method that performs the actual DELETE API request to unsubscribe from the specified webhook.async unsubscribeFromWebhook(webhookId) { return this.request('DELETE', `/webhooks/${webhookId}`); }