slack_get_file
Retrieve file details and download URLs from Slack to access voice notes and documents shared in channels.
Instructions
Get information about a file shared in Slack, including download URL. Use this to retrieve voice notes and documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The Slack file ID. |
Implementation Reference
- src/index.js:607-638 (handler)The handler implementation for the `slack_get_file` tool, which calls `slack.files.info` to retrieve file metadata.
case "slack_get_file": { const fileId = args.file_id; const result = await slack.files.info({ file: fileId, }); const file = result.file; return { content: [ { type: "text", text: JSON.stringify( { id: file.id, name: file.name, title: file.title, mimetype: file.mimetype, size: file.size, url_private: file.url_private, url_private_download: file.url_private_download, created: new Date(file.created * 1000).toISOString(), user: file.user, }, null, 2 ), }, ], }; } - src/index.js:193-205 (schema)The definition and input schema for the `slack_get_file` tool.
{ name: "slack_get_file", description: "Get information about a file shared in Slack, including download URL. Use this to retrieve voice notes and documents.", inputSchema: { type: "object", properties: { file_id: { type: "string", description: "The Slack file ID.", }, }, required: ["file_id"],