Back to Copilotkit

defaultSlackTools

showcase/shell-docs/src/content/reference/bot/slack/defaultSlackTools.mdx

1.60.11.5 KB
Original Source

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 }):

ts
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.

<PropertyReference name="query" type="string" required> Handle (`atai`), display name (`Atai Barkai`), first name, or email of the person to look up. </PropertyReference>

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.