mattermost_set_default
Set a specified channel as the default webhook for sending messages through the Mattermost MCP server, ensuring consistent message routing to your preferred channel.
Instructions
지정한 채널을 기본 웹훅으로 설정합니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | 기본으로 설정할 채널명 |
Implementation Reference
- index.js:171-194 (handler)The handler function that validates the channel, checks if it exists in config, sets it as default_channel, saves the config, and returns a success message.async setDefault(channel) { if (!channel || typeof channel !== "string") { throw new Error("channel 인자가 필요합니다."); } const config = this.loadConfig(); const channelExists = config.webhooks.some((w) => w.channel === channel); if (!channelExists) { throw new Error(`등록되지 않은 채널입니다: ${channel}`); } config.default_channel = channel; this.saveConfig(config); return { content: [ { type: "text", text: `기본 채널이 '${channel}' 으로 설정되었습니다.`, }, ], }; }
- index.js:88-97 (schema)Input schema defining the required 'channel' string parameter.inputSchema: { type: "object", properties: { channel: { type: "string", description: "기본으로 설정할 채널명", }, }, required: ["channel"], },
- index.js:85-98 (registration)Tool registration in the listTools handler, including name, description, and input schema.{ name: "mattermost_set_default", description: "지정한 채널을 기본 웹훅으로 설정합니다.", inputSchema: { type: "object", properties: { channel: { type: "string", description: "기본으로 설정할 채널명", }, }, required: ["channel"], }, },
- index.js:128-129 (registration)Dispatch case in the CallToolRequestSchema handler that invokes the setDefault method.case "mattermost_set_default": return await this.setDefault(args.channel);