Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_download_file

Download files from POHODA documents storage. Retrieve file content for documents under 100KB or get size information for larger files using relative paths.

Instructions

Download a file from POHODA documents storage. Returns file size and base64 content for files under 100KB; for larger files returns size info only. Path is relative to documents root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesRelative path to the file in POHODA documents storage

Implementation Reference

  • The handler function for the pohoda_download_file tool that downloads a file using the POHODA client and returns its base64 content if it is under 100KB.
    async ({ filePath }) => {
      try {
        const buf = await client.downloadFile(filePath);
        const size = buf.length;
        const sizeKb = size / 1024;
        if (size < 100 * 1024) {
          const base64 = buf.toString("base64");
          return ok(`File size: ${size} bytes (${sizeKb.toFixed(1)} KB)\n\nBase64 content:\n${base64}`);
        }
        return ok(`File size: ${size} bytes (${sizeKb.toFixed(1)} KB). File too large for inline transfer; use external download for files over 100 KB.`);
      } catch (e) {
        return err((e as Error).message);
      }
    }
  • Registration of the pohoda_download_file tool.
    server.tool(
      "pohoda_download_file",
      "Download a file from POHODA documents storage. Returns file size and base64 content for files under 100KB; for larger files returns size info only. Path is relative to documents root.",
      {
        filePath: z.string().describe("Relative path to the file in POHODA documents storage"),
      },
      async ({ filePath }) => {
        try {
          const buf = await client.downloadFile(filePath);
          const size = buf.length;
          const sizeKb = size / 1024;
          if (size < 100 * 1024) {
            const base64 = buf.toString("base64");
            return ok(`File size: ${size} bytes (${sizeKb.toFixed(1)} KB)\n\nBase64 content:\n${base64}`);
          }
          return ok(`File size: ${size} bytes (${sizeKb.toFixed(1)} KB). File too large for inline transfer; use external download for files over 100 KB.`);
        } catch (e) {
          return err((e as Error).message);
        }
      }

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/hlebtkachenko/pohoda-mcp'

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