list_services
Retrieve a list of configured webhook services and auto-detected defaults for sending notifications to Discord or Slack with secure management and validation.
Instructions
List configured webhook services and auto-detected default
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:30-48 (handler)The handler function for the 'list_services' tool. It calls getServiceStatus() to retrieve the configuration status of Discord and Slack services and returns the result as a formatted JSON text block.async () => { const status = getServiceStatus(); const result = { discordConfigured: status.discordConfigured, slackConfigured: status.slackConfigured, autoDefault: status.autoDefault, bothConfigured: status.bothConfigured }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2) } ] }; }
- src/index.ts:25-49 (registration)Registration of the 'list_services' tool using server.tool(), including description, empty input schema, and inline handler function.// Tool: list_services server.tool( "list_services", "List configured webhook services and auto-detected default", {}, async () => { const status = getServiceStatus(); const result = { discordConfigured: status.discordConfigured, slackConfigured: status.slackConfigured, autoDefault: status.autoDefault, bothConfigured: status.bothConfigured }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2) } ] }; } );
- src/types.ts:63-63 (schema)Zod schema definition for the 'list_services' tool input parameters (empty object as no inputs are required).export const ListServicesSchema = z.object({});
- src/config.ts:134-148 (helper)Helper function getServiceStatus() that provides the service configuration status used by the list_services handler.export function getServiceStatus(): { discordConfigured: boolean; slackConfigured: boolean; autoDefault: Service; bothConfigured: boolean; } { const config = getConfig(); return { discordConfigured: !!config.discordWebhookUrl, slackConfigured: !!config.slackWebhookUrl, autoDefault: config.autoDefault, bothConfigured: !!(config.discordWebhookUrl && config.slackWebhookUrl), }; }