fal-get-status
Retrieve the execution status of a model by supplying request ID and model ID, enabling follow-up with the result retrieval tool.
Instructions
Get the status of a model. The status is returned using the fal.run endpoint. You need to check the status of the model using the fal-get-status tool, then get the result using the fal-get-result tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requestId | Yes | ||
| modelId | Yes |
Implementation Reference
- src/tools/index.ts:96-104 (handler)The tool registration and handler for 'fal-get-status'. It defines the tool with schema parameters (requestId: z.string(), modelId: z.string()) and the handler that calls client.getStatus(requestId, modelId) to fetch the async job status.
server.tool( 'fal-get-status', 'Get the status of a model. The status is returned using the fal.run endpoint. You need to check the status of the model using the fal-get-status tool, then get the result using the fal-get-result tool.', { requestId: z.string(), modelId: z.string() }, async ({ requestId, modelId }) => { const output = await client.getStatus(requestId, modelId); return { content: [{ type: 'text', text: toText(output) }] }; }, ); - src/services/fal-client.ts:67-71 (helper)The getStatus() method on FalClient that constructs the URL to the fal.ai queue status endpoint and performs the actual HTTP GET request to retrieve the job status.
async getStatus(requestId: string, modelId: string): Promise<unknown> { const baseModel = this._baseModelId(this._normalizeModelId(modelId)); const url = `${this.QUEUE_BASE}/${baseModel}/requests/${encodeURIComponent(requestId)}/status`; return await this._getJson(url); } - src/tools/index.ts:96-104 (registration)The tool is registered via server.tool('fal-get-status', ...) inside the registerTools function, which is exported and called from the server startup code.
server.tool( 'fal-get-status', 'Get the status of a model. The status is returned using the fal.run endpoint. You need to check the status of the model using the fal-get-status tool, then get the result using the fal-get-result tool.', { requestId: z.string(), modelId: z.string() }, async ({ requestId, modelId }) => { const output = await client.getStatus(requestId, modelId); return { content: [{ type: 'text', text: toText(output) }] }; }, ); - src/tools/index.ts:99-99 (schema)The input schema for fal-get-status defines two required string parameters: requestId and modelId, validated using Zod.
{ requestId: z.string(), modelId: z.string() },