Skip to main content
Glama

fal-get-result

Retrieve the output of a completed model run, automatically converting any image URLs in the response to embedded base64 data. Use after checking execution status with the status tool.

Instructions

Get the result of a model execution and automatically download any image URLs in the response. Returns the model output with embedded base64 image data for any image URLs found. You need to check the status of the model using the fal-get-status tool first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
modelIdYes

Implementation Reference

  • Registration of the 'fal-get-result' tool using server.tool(). Defines the name, description, schema (requestId and modelId strings), and handler that delegates to client.getResult().
    server.tool(
        'fal-get-result',
        'Get the result of a model execution and automatically download any image URLs in the response. Returns the model output with embedded base64 image data for any image URLs found. You need to check the status of the model using the fal-get-status tool first.',
        { requestId: z.string(), modelId: z.string() },
        async ({ requestId, modelId }) => {
            const output = await client.getResult(requestId, modelId);
            return { content: [{ type: 'text', text: toText(output) }] };
        },
    );
  • The handler function for 'fal-get-result'. Calls client.getResult(requestId, modelId) and returns the output as text content.
    async ({ requestId, modelId }) => {
        const output = await client.getResult(requestId, modelId);
        return { content: [{ type: 'text', text: toText(output) }] };
    },
  • Input schema definition for 'fal-get-result' tool: { requestId: z.string(), modelId: z.string() } using Zod validation.
    { requestId: z.string(), modelId: z.string() },
  • The getResult() method on FalClient that performs the actual HTTP GET request to the queue endpoint baseModel/requests/requestId.
    async getResult(requestId: string, modelId: string): Promise<unknown> {
        const baseModel = this._baseModelId(this._normalizeModelId(modelId));
        const url = `${this.QUEUE_BASE}/${baseModel}/requests/${encodeURIComponent(requestId)}`;
        const output = await this._getJson(url);
        return output;
    }
Behavior4/5

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

Discloses automatic download and base64 embedding of image URLs, a key behavioral trait. No annotations provided, so description carries full burden; lacks error handling or rate limit info but sufficient for core behavior.

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?

Two sentences, no redundancy, front-loaded with primary action and secondary usage guideline.

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?

Describes output (model output with embedded base64 images) but lacks full output schema. Adequate but could be improved with more details on return format.

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?

Parameters (requestId, modelId) are not explained in description. With 0% schema description coverage, description should compensate but does not add meaning beyond tool purpose.

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?

Description clearly states it gets model execution results and automatically processes image URLs, distinguishing it from siblings like fal-get-status and fal-cancel.

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 instructs to check status first via fal-get-status, providing a clear prerequisite. No explicit alternatives or when-not-to-use, but effectively guided.

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/Forge-Systems-Hub/mcp-fal-ai-server'

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