Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
            }
          ]
        };
      }
    );
  • Zod schema definition for the 'list_services' tool input parameters (empty object as no inputs are required).
    export const ListServicesSchema = z.object({});
  • 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),
      };
    }
Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thesammykins/notifyme_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server