mattermost_list_webhooks
View registered Mattermost webhook channels to manage communication endpoints for sending messages via the MCP protocol.
Instructions
등록된 Mattermost 웹훅 채널 목록을 확인합니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:151-169 (handler)The main handler function for the 'mattermost_list_webhooks' tool. It loads the config, extracts default channel and list of webhooks, and returns formatted JSON response.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:80-83 (schema)Input schema for the tool, which requires no parameters (empty object).inputSchema: { type: "object", properties: {}, },
- index.js:77-84 (registration)Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema.{ name: "mattermost_list_webhooks", description: "등록된 Mattermost 웹훅 채널 목록을 확인합니다.", inputSchema: { type: "object", properties: {}, }, },
- index.js:125-127 (registration)Dispatch/registration in the CallToolRequestSchema switch statement, routing to the listWebhooks handler.case "mattermost_list_webhooks": return await this.listWebhooks();
- index.js:39-52 (helper)Helper method used by the handler to load the webhooks configuration from YAML file.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}`); } }