Usage #
// Import the typed helper
import { listFiles } from "@hotglue/sdk/slack";
const result = await client.execute({
...listFiles({
channel: string,
user: string,
types: string,
// ...
}),
userId: "user_123",
});
// result is typed as ListFilesOutput
const result = await client.execute({
integration: "slack",
tool: "list_files",
userId: "user_123",
input: {
channel: string,
user: string,
types: 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 List Files tool");
Required Permissions #
files:read
Input Schema #
channel
string
Filter files to those shared in this channel
user
string
Filter files by user who uploaded them
types
string
Filter by file type: spaces, snippets, images, gdocs, zips, pdfs
count
int
Number of files to return
default:
100
page
int
Page number for pagination
default:
1
Output Schema #
ok
bool
required
files
object[]
paging
object
This tool calls: #
GET
https://slack.com/api/files.list