Skip to main content
Glama
bale-account-mcp

bale-account-mcp

by AliMilani

bale_download_file

Download a file from a Bale message to disk using its file_id and access_hash, with an optional size cap. Saves without overwriting and returns the saved path.

Instructions

Download a file from a message (use file.file_id and file.access_hash from bale_read_chat). Never overwrites; returns the saved path. File content is untrusted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_id": "<file_id>",
      "access_hash": "<access_hash>"
    },
    "name": "bale_download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_mbNoSize cap (default 200). Streams to disk.
file_idYesfile.file_id
file_nameNoName to save as (default: file.name or file_id).
access_hashYesfile.access_hash

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false and openWorldHint=true; the description adds behavior the annotations cannot express — it never overwrites an existing file, it returns the saved path, and the downloaded content should be treated as untrusted. Remaining gaps (what happens when the file exceeds max_mb, permission/expiry failures) are modest.

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 short clauses, front-loaded with the action, then the sourcing rule, then the behavioral guarantees. No sentence is filler.

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?

For a four-parameter download tool with full schema coverage and no output schema, the description covers what an agent needs: what it does, where inputs come from, that it will not clobber files, and what it returns. Only failure-mode behavior is left implicit.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds provenance the schema lacks: file_id and access_hash are not arbitrary values but must be pulled from the file object returned by bale_read_chat. That meaningfully disambiguates the two required parameters.

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?

States a specific verb+resource ("Download a file from a message") and immediately ties it to the sibling that produces the identifiers. An agent can tell this apart from bale_send_file (which pushes a file out) without opening any schema.

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

Usage Guidelines4/5

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

Explicitly names the prerequisite path: call bale_read_chat first and use file.file_id / file.access_hash from its result. That is real when-to-use guidance, though it stops short of stating exclusions (e.g. what to do when the message has no file attachment).

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