kiro-discord-bot

Bot Tools MCP #

每個已初始化的頻道都會取得內建 bot-tools MCP server。它把 bot 原生能力提供給 active ACP agent,同時仍然套用目前 Discord channel、thread、MCP policy 與 safe egress 規則。

這個 server 與 MCP catalog 裡的外部 MCP server 是分開的。

預設工具權限 #

第一次完成頻道設定時,預設會啟用這些安全工具:

Tool類型用途
bot_data_summaryRead摘要 bot data directory,不包含訊息內容。
bot_list_channel_dataRead列出已知 channel data folders 與 metadata 是否存在,不包含訊息內容。
bot_list_cronRead列出目前頻道的排程任務。
bot_send_fileWrite, non-destructive將 sanitized file upload 排入 Discord delivery queue。
bot_create_cronWrite, non-destructive排入建立 scheduled task 的請求。

這些工具存在,但預設不啟用:

Tool類型用途
bot_send_messageWrite, non-destructive排入額外 Discord message。
bot_delete_cronWrite, destructive排入刪除 scheduled task 的請求。
bot_query_auditRead, sensitive查詢 scoped audit timeline rows。

/audit <prompt> 會暫時只授權 bot_query_audit 給私密 audit investigation agent。該 agent 不能使用一般 Discord egress tools。

Scope Enforcement #

bot-tools session 會綁定目前 channel 或 thread target。工具呼叫若嘗試操作其他 channel,會回傳 channel-scope error。

Cron 管理在 runtime 中是 channel scope;thread ID 會依需要正規化成 parent channel。

安全 Discord Egress #

bot_send_messagebot_send_file 不會在 MCP call 裡直接寫 Discord。它們會建立 safe egress action,再由 bot 透過正常 Discord path 投遞。

File egress 採保守設計:

Audit Query Tool #

bot_query_audit 是 read-only 且限制在目前 bot-tools context。支援:

這個工具回傳 timeline rows,不提供任意 SQL access。