mattermost_list_webhooks
View all configured Mattermost webhook channels to manage integration points for message delivery through the MCP protocol.
Instructions
등록된 Mattermost 웹훅 채널 목록을 확인합니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:151-169 (handler)Executes the tool logic: loads webhook config from YAML, constructs a result with default channel and list of channels, and returns it as formatted JSON text content.async listWebhooks() { const config = this.loadConfig(); const result = { default: config.default_channel || null, channels: config.webhooks.map((w) => ({ channel: w.channel, description: w.description || "", })), }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- index.js:77-84 (registration)Registers the tool in the listTools handler with name, Korean description, and empty input schema (no parameters required).{ name: "mattermost_list_webhooks", description: "등록된 Mattermost 웹훅 채널 목록을 확인합니다.", inputSchema: { type: "object", properties: {}, }, },
- index.js:125-126 (registration)Registers the tool dispatch in the callToolRequest switch statement, calling the listWebhooks handler method.case "mattermost_list_webhooks": return await this.listWebhooks();
- index.js:80-83 (schema)Defines the input schema as an empty object, indicating no input parameters are required.inputSchema: { type: "object", properties: {}, },
- index.js:39-52 (helper)Helper method to load and validate the webhook configuration from YAML file, used by the handler.loadConfig() { try { const fileContents = readFileSync(CONFIG_PATH, "utf8"); const config = yaml.load(fileContents); if (!config || !config.webhooks || !Array.isArray(config.webhooks)) { throw new Error("Invalid config structure"); } return config; } catch (error) { throw new Error(`Failed to load config: ${error.message}`); } }