Skip to main content
Glama

Get fal.ai Model Input/Output Schema

fal_get_model_schema
Read-onlyIdempotent

Fetch the OpenAPI schema for any fal.ai model to see its required inputs and output structure.

Instructions

Fetch the OpenAPI schema for a specific fal.ai model, showing exactly which input fields it accepts (names, types, defaults, enums) and what its output looks like. Call this before fal_run_model or fal_submit_request whenever you're unsure of a model's required arguments.

Args:

  • model_id (string): The fal.ai model id, e.g. "fal-ai/flux-pro/kontext"

  • response_format ('markdown' | 'json'): Output format (default: markdown)

Returns: For JSON format: the raw OpenAPI document for that model endpoint. For markdown format: a summary of the request/response schemas.

Examples:

  • Use when: "What parameters does fal-ai/flux-pro/kontext take?" -> model_id="fal-ai/flux-pro/kontext"

  • Use when: you got a 422 error from fal_run_model and need to see the correct field names

  • Don't use when: you already know the model's arguments from prior use

Error Handling:

  • Returns "Not found (404)" if the model_id doesn't exist

  • Returns "Authentication failed" if FAL_KEY is missing or invalid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesThe fal.ai model/endpoint id, e.g. "fal-ai/flux/dev", "fal-ai/flux-pro/kontext", or "fal-ai/minimax/video-01". Find valid ids with fal_list_models or at https://fal.ai/models.
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readable (default: markdown)markdown
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint as safe. Description adds error handling details: returns 'Not found (404)' for invalid model_id and 'Authentication failed' for missing/invalid FAL_KEY. Discloses output format based on response_format. No contradictions.

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?

Well-structured with clear sections: purpose, Args, Returns, Examples, Error Handling. Each sentence adds value, no fluff. Front-loaded with main purpose and usage context. Appropriate length for the complexity.

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?

Given the tool's simplicity (2 parameters, no output schema, rich annotations), the description covers all necessary aspects: purpose, parameters, usage guidelines, error handling, and examples. No gaps. The agent can fully understand when and how to use the tool.

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

Parameters5/5

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

Schema description coverage is 100%, but description adds significant value: provides multiple examples for model_id, explains the difference between markdown and json response_format, and clarifies the meaning of each parameter in context. Also explains how response_format affects return values.

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 states it fetches the OpenAPI schema for a specific fal.ai model, showing input fields and output. It clearly distinguishes from siblings like fal_run_model, fal_submit_request, and fal_list_models by saying 'Call this before fal_run_model or fal_submit_request whenever you're unsure of a model's required arguments.'

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

Usage Guidelines5/5

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

Explicitly states when to use (before running a model if unsure of arguments) and when not to use (if you already know the model's arguments). Provides concrete examples like getting a 422 error. Also mentions alternatives implicitly via sibling context.

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/MalcolmXavier7/fal-mpc'

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