Skip to main content
Glama

fetch_job_file

Download a job result that was delivered as a FILE (transferred P2P via iroh) to a local path. Use this after submit_and_pay_job or get_job_result reports a file result.

Instructions

Download a job result that was delivered as a FILE (transferred P2P via iroh) to a local path. Use this after submit_and_pay_job or get_job_result reports a file result. Resumable and bounded by a max file size; the bytes are written to disk, never returned to you inline.

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": {
      "job_event_id": "<job_event_id>",
      "output_path": "<output_path>"
    },
    "name": "fetch_job_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
kind_offsetNo
output_pathYesLocal path to write the downloaded result file to.
job_event_idYes
timeout_secsNo
provider_npubNo
attachment_indexNoWhich file to download when the result has MULTIPLE files (0-based; default 0). The download message reports the total count so you can fetch the others.
allow_outside_cwdNoAllow writing outside the MCP server working directory. Off by default: the bytes come from an untrusted provider, so writes are confined to the working directory subtree (and never to a secret/auto-run path) unless this is set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.60
    • addedInput schema / properties / attachment_index / maximum
      Added value: +9007199254740991
  2. Changed1 schema field changedv0.1.42
    • addedInput schema / properties / attachment_index
      Added value: +{
      +  "default": 0,
      +  "description": "Which file to download when the result has MULTIPLE files (0-based; default 0). The download message reports the total count so you can fetch the others.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  3. Addedv0.1.37

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious behavior: transfers are resumable, bounded by a max file size, and bytes land on disk rather than being returned inline. It omits the untrusted-provider confinement and timeout behavior, but those are covered in the schema's allow_outside_cwd description rather than lost entirely.

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 sentences, front-loaded with the action and mechanism, then the trigger condition, then the key behavioral traits. No filler or repeated schema content.

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?

For a 7-parameter tool with no annotations and no output schema, the definition covers purpose, trigger, and transfer characteristics well. It leaves gaps on what a successful call returns (path confirmation? file count?) and on four of the seven parameters, including the id that selects the job.

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

Parameters2/5

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

Schema coverage is 43% (below 50%), so the description needs to compensate and largely does not. It clarifies the local-path target conceptually but never explains job_event_id, kind_offset, timeout_secs, or provider_npub, which are undocumented in both the schema and the description.

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 job result... to a local path") and adds the defining qualifier that the result was delivered as a FILE via P2P iroh transfer. It explicitly distinguishes itself from get_job_result, which only reports a file result rather than fetching it.

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?

"Use this after submit_and_pay_job or get_job_result reports a file result" gives a clear triggering condition and names the sibling tools that precede it. It lacks an explicit when-not clause (e.g. what to do for inline/JSON results) but the condition is specific enough to act on.

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