Usage #
// Import the typed helper
import { addBookmark } from "@hotglue/sdk/slack";
const result = await client.execute({
...addBookmark({
channel_id: string,
title: string,
type: string,
// ...
}),
userId: "user_123",
});
// result is typed as AddBookmarkOutput
const result = await client.execute({
integration: "slack",
tool: "add_bookmark",
userId: "user_123",
input: {
channel_id: string,
title: string,
type: string,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});
await agent.generate("run the Add Bookmark tool");
Required Permissions #
bookmarks:write
Input Schema #
channel_id
string
required
Channel ID
title
string
required
Title for the bookmark
type
string
required
Type of bookmark (currently only "link" is supported)
default:
link
link
string
required
URL for the bookmark
emoji
string
Emoji to use as the bookmark icon
Output Schema #
ok
bool
required
bookmark
object
This tool calls: #
POST
https://slack.com/api/bookmarks.add