Skip to main content
Glama
larrygmaguire-hash

Slack Note Capture MCP Server

slack_download_file

Download files from Slack and save them locally using file ID and destination path.

Instructions

Download a file from Slack and save it to the specified path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesThe Slack file ID to download.
save_pathYesLocal file path where the file should be saved.

Implementation Reference

  • The handler logic for 'slack_download_file' which fetches the file from Slack and saves it to a local path.
    case "slack_download_file": {
      const fileId = args.file_id;
      const savePath = args.save_path;
    
      // Get file info first
      const fileInfo = await slack.files.info({
        file: fileId,
      });
    
      const file = fileInfo.file;
      const downloadUrl = file.url_private_download || file.url_private;
    
      if (!downloadUrl) {
        return {
          content: [
            {
              type: "text",
              text: "Error: No download URL available for this file.",
            },
          ],
        };
      }
    
      // Download the file using fetch with auth header
      const response = await fetch(downloadUrl, {
        headers: {
          Authorization: `Bearer ${SLACK_BOT_TOKEN}`,
        },
      });
    
      if (!response.ok) {
        return {
          content: [
            {
              type: "text",
              text: `Error downloading file: ${response.status} ${response.statusText}`,
            },
          ],
        };
      }
    
      // Write to file
      const fs = await import("fs/promises");
      const path = await import("path");
    
      // Ensure directory exists
      await fs.mkdir(path.dirname(savePath), { recursive: true });
    
      const buffer = Buffer.from(await response.arrayBuffer());
      await fs.writeFile(savePath, buffer);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                success: true,
                file_name: file.name,
                saved_to: savePath,
                size: buffer.length,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • The schema definition for the 'slack_download_file' tool.
    {
      name: "slack_download_file",
      description:
        "Download a file from Slack and save it to the specified path.",
      inputSchema: {
        type: "object",
        properties: {
          file_id: {
            type: "string",
            description: "The Slack file ID to download.",
          },
          save_path: {
            type: "string",
            description: "Local file path where the file should be saved.",
          },
        },
        required: ["file_id", "save_path"],
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full disclosure burden. While it mentions saving to a path, it omits critical behavioral details: what happens if the path is invalid, whether directories are auto-created, authentication requirements, rate limits, and crucially—what the tool returns (success indicator, file metadata, etc.) since no output schema exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single efficient sentence with zero waste. Action verb front-loaded. Appropriate length for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for basic invocation given the simple 2-parameter schema with full coverage, but insufficient for a filesystem-mutating tool with no output schema. Should specify return value format and error conditions (e.g., path not found, permission denied) to be complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage ('The Slack file ID to download', 'Local file path where the file should be saved'). The description does not add semantic nuance beyond the schema (format examples, path constraints, or file_id sources), warranting the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (download), resource (file from Slack), and destination (specified path). However, it fails to distinguish from sibling tool 'slack_get_file', which likely retrieves metadata rather than saving binary content to disk—a critical distinction for tool selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance provided on when to use this versus 'slack_get_file' or prerequisites like obtaining the file_id. Missing information about path requirements (e.g., directory must exist) or permissions needed to write to the local filesystem.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/larrygmaguire-hash/slack-note-capture'

If you have feedback or need assistance with the MCP directory API, please join our Discord server