defaultSlackTools
The Slack tools the adapter ships ā lookup_slack_user resolves a person to a <@USERID> mention.
Overview
defaultSlackTools is the flat list of universal Slack tools the package ships. It is not auto-applied ā you spread it explicitly, so there's no hidden behavior. Today it contains one tool, also exported individually as lookupSlackUserTool.
Usage
Spread it into createBot({ tools }):
import { defaultSlackTools } from "@copilotkit/bot-slack";
const bot = createBot({
// ā¦
tools: [...defaultSlackTools, ...myAppTools],
});lookup_slack_user
Resolves a person to a Slack user ID so the agent can @-mention them properly.
Prop
Type
Returns (to the agent): on success { found: true, query, userId, name, handle, email, mention } ā where mention is the ready-to-paste <@Uā¦> string the agent should put verbatim in its reply; on a miss, { found: false, query } so the agent writes the plain name instead.
Under the hood it calls thread.lookupUser(query), the capability-gated directory search this adapter backs.
Related
- defaultSlackContext ā the companion context entries (tagging procedure)
- defineBotTool ā how these tools are defined
- slack() ā the adapter