Skip to main content
Glama

fal-list-models

Retrieve a paginated list of available models from fal.ai to manage model discovery without overloading.

Instructions

List all available models from fal.ai with optional pagination parameters. Avoid listing all models at once as it may be too many models to process.. Use the limit and page parameters to paginate the results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo

Implementation Reference

  • The tool registration and handler function for 'fal-list-models'. Calls client.listModels() with optional limit/page, then returns the result as text.
    server.tool(
        'fal-list-models',
        'List all available models from fal.ai with optional pagination parameters. Avoid  listing all models at once as it may be too many models to process.. Use the limit and page parameters to paginate the results.',
        {
            limit: z.number().optional(),
            page: z.number().optional(),
        },
    
        async ({ limit, page }) => {
            const result = (await client.listModels({ limit, page })) as
                | { models?: FalModel[]; data?: FalModel[] }
                | FalModel[]
                | unknown;
            const list = Array.isArray(result) ? result : ((result as any)?.models ?? (result as any)?.data ?? result);
            return { content: [{ type: 'text', text: toText(list) }] };
        },
  • Input schema for 'fal-list-models' using Zod: optional 'limit' and 'page' number parameters.
    {
        limit: z.number().optional(),
        page: z.number().optional(),
  • Tool registered via server.tool() with name 'fal-list-models' and description about pagination.
    server.tool(
        'fal-list-models',
        'List all available models from fal.ai with optional pagination parameters. Avoid  listing all models at once as it may be too many models to process.. Use the limit and page parameters to paginate the results.',
        {
            limit: z.number().optional(),
            page: z.number().optional(),
        },
    
        async ({ limit, page }) => {
            const result = (await client.listModels({ limit, page })) as
                | { models?: FalModel[]; data?: FalModel[] }
                | FalModel[]
                | unknown;
            const list = Array.isArray(result) ? result : ((result as any)?.models ?? (result as any)?.data ?? result);
            return { content: [{ type: 'text', text: toText(list) }] };
        },
    );
  • The FalClient.listModels() method that makes the actual HTTP GET request to https://fal.ai/api/models with optional limit/page query params.
    async listModels(params?: { limit?: number; page?: number }): Promise<FalModel[]> {
        const url = new URL(`${this.BASE_URL}/models`);
        if (params?.limit != null) url.searchParams.set('limit', String(params.limit));
        if (params?.page != null) url.searchParams.set('page', String(params.page));
        return this._getJson(url.toString()) as Promise<FalModel[]>;
    }
  • The FalModel Zod schema and TypeScript type used as return type for listModels().
    import { z } from 'zod';
    
    export const FalModelSchema = z.object({
        id: z.string(),
        modelId: z.string(),
        isFavorited: z.boolean(),
        title: z.string(),
        category: z.string(),
        tags: z.array(z.string()),
        shortDescription: z.string(),
        thumbnailUrl: z.string(),
        modelUrl: z.string(),
        githubUrl: z.string(),
        licenseType: z.string(),
        date: z.string(),
        group: z.object({
            key: z.string(),
            label: z.string(),
        }),
        machineType: z.string().nullable(),
        examples: z.array(z.string()),
        highlighted: z.boolean(),
        authSkippable: z.boolean(),
        unlisted: z.boolean(),
        deprecated: z.boolean(),
        resultComparison: z.boolean(),
        hidePricing: z.boolean(),
        private: z.boolean(),
        removed: z.boolean(),
        adminOnly: z.boolean(),
        kind: z.string(),
        trainingEndpoints: z.array(z.unknown()),
    });
    
    export type FalModel = z.infer<typeof FalModelSchema>;
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It warns about potential issues with too many models but does not disclose other behavioral traits such as whether the operation is read-only, rate limits, or side effects. The warning is useful but insufficient.

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?

The description consists of two concise sentences with no unnecessary information. The first sentence clearly states the purpose, and the second provides essential usage guidance. Every sentence earns its place.

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 simple list tool with two parameters and no output schema, the description covers the basic purpose and pagination advice. However, it lacks details about default behavior, result format, or whether results are sorted, leaving some gaps for the agent.

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 description coverage is 0%, so the description must compensate. It mentions using limit and page for pagination but does not explain their semantics (e.g., maximum limit, zero-based indexing, defaults). This adds minimal value beyond the schema's parameter names.

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 clearly states the tool lists all available models from fal.ai with optional pagination, using a specific verb (list) and resource (models). It distinguishes from sibling tools like fal-search-models, which implies search/filter functionality.

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 explicitly advises against listing all models at once and recommends using pagination parameters, providing clear when-to-use guidance. However, it does not mention alternatives or when to avoid this tool in favor of others like fal-search-models.

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