Skip to main content
Glama

gemini_get_result

Retrieve the result of an asynchronous generation by passing its job_id. Gets media outputs or raises the recorded error, including recovery for killed background jobs.

Instructions

Retrieve a generation started with async: true or handed off by max_wait_ms. Pass the returned job_id: while running it reports status "running"; on completion it returns the normal result (image URLs/paths + meta); on failure it raises the recorded error, including the case where the generation was killed before it finished. On the hosted connector job records are stored durably and survive a restart; on a local stdio server they live with the process and expire ~10 min after completion, where the output dir / .json sidecar is the fallback. A killed video/music job started with background: true is recovered from its upstream interaction when it finished there.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesThe job_id returned by a generation tool called with async: true
output_dirNoWhere to write media recovered from a killed job (default: $GEMINI_OUTPUT_DIR or cwd)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv1.10.0
    • addedInput schema / properties / output_dir
      Added value: +{
      +  "description": "Where to write media recovered from a killed job (default: $GEMINI_OUTPUT_DIR or cwd)",
      +  "type": "string"
      +}
  2. First observedv1.2.0

TDQS

A4.4/5.0
Behavior5/5

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

The description goes far beyond the annotations by explaining exactly what happens while the job is running, on completion, and on failure, including the killed-before-finished case. It also discloses durability differences between hosted and local servers, expiration behavior, and recovery of killed background jobs. This is rich behavioral context that the annotations alone do not provide.

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

Conciseness4/5

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

The description is dense but not bloated; every sentence delivers useful information about retrieval, status, failure, durability, and recovery. It is not formatted with bullets, but the first sentence is front-loaded with purpose and usage. Slightly more structure would make the edge cases easier to scan, but there is no wasted wording.

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

Completeness5/5

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

There is no output schema, yet the description explains the return behavior clearly: status 'running', normal result with image URLs/paths and meta, and raised errors. It also covers the optional output_dir in the killed-job recovery flow and gives environment-specific behavior. For a tool with this complexity, the description is unusually 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 description coverage is 100%, and both parameters already have meaningful schema descriptions. The tool description reinforces them by explaining the job_id lifecycle and the output_dir fallback, but it does not substantially add semantics beyond what the input schema already states. Baseline 3 is appropriate.

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 specific verb and resource: 'Retrieve a generation started with async: true or handed off by max_wait_ms.' This unambiguously distinguishes gemini_get_result from the sibling generation, editing, file-management, and interaction tools. It also specifies the exact input (job_id) and expected output shape, so there is no doubt about what the tool does.

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?

The description clearly states when to use the tool: after a generation was started with async: true or after max_wait_ms handed off a job. This gives the agent actionable context. It does not explicitly name alternatives or say when not to use this tool, but among the siblings none serve the same result-retrieval role, so the guidance is sufficient.

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

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/chrischall/gemini-mcp'

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