Delete File

Deletes a file

Usage #

// Import the typed helper
import { deleteFile } from "@hotglue/sdk/slack";
const result = await client.execute({
...deleteFile({
file: string,
}),
userId: "user_123",
});
// result is typed as DeleteFileOutput
const result = await client.execute({
integration: "slack",
tool: "delete_file",
userId: "user_123",
input: {
file: 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 Delete File tool");

Required Permissions #

files:write

Input Schema #

file string required

File ID to delete

Output Schema #

ok bool required

This tool calls: #

POST https://slack.com/api/files.delete