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);
        }
      }
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses critical behavioral traits: the dual-mode return behavior (base64 content for <100KB files, size-only for larger) and the path relativization requirement. It misses explicit safety classification (though 'Download' implies read-only) and error handling details.

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?

Three sentences with zero waste: sentence 1 states purpose, sentence 2 discloses the critical 100KB behavioral threshold, sentence 3 clarifies the path parameter constraint. Information is front-loaded and each sentence earns its place.

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

Completeness4/5

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

Given the lack of output schema, the description appropriately compensates by detailing return value structures (base64 vs size info). For a single-parameter tool, it covers the essential complexity (size limits) but could benefit from mentioning error cases (e.g., file not found) or authentication requirements.

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?

With 100% schema description coverage, the schema already adequately documents the filePath parameter. The description echoes this with 'Path is relative to documents root,' which reinforces but doesn't significantly extend the schema's semantic meaning. Baseline score appropriate given schema completeness.

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

Purpose5/5

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

The description opens with a clear specific verb ('Download') and resource ('file from POHODA documents storage'). It effectively distinguishes itself from the numerous sibling CRUD tools (create_invoice, list_orders, etc.) by specifying this is for file retrieval from document storage rather than business entity operations.

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

Usage Guidelines3/5

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

The description provides implicit usage guidance through the 100KB threshold disclosure, which informs users when they'll receive full content vs. metadata only. However, it lacks explicit 'when to use' guidance comparing it to document export features that might exist in other tools, and doesn't specify prerequisites or error conditions.

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

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