Skip to content

Inconsistent sources schema and example in firecrawl_search tool (causes 422 errors) #127

@lski-tools

Description

@lski-tools

The firecrawl_search tool’s OpenAPI specification defines sources as an array of objects with a required type field:

"firecrawl_search_form_model_sources_item_model": {
  "properties": {
    "type": { "type": "string", "title": "Type" }
  },
  "type": "object",
  "required": ["type"]
}

However, the tool’s description text in src/index.ts shows usage examples that use a string array instead:

"sources": ["web"]

This mismatch causes LLMs and clients that rely on the example (like OpenWebUI or LangChain tool integrations) to send ["web"], which leads to 422 validation errors:

HTTP error 422: {"detail":[{"type":"model_attributes_type","loc":["body","sources",0],"msg":"Input should be a valid dictionary or object to extract fields from","input":"web"}]}

Here is a link to the line in question:

"sources": [

I think there are more examples further down that also have the same problem.

Expected behavior:

The examples in the tool description should match the actual schema and use the object form:

"sources": [ { "type": "web" } ]

Possible improvements:

  • Update the example JSON blocks in src/index.ts for firecrawl_search to use the object form.
  • Optionally make the Zod schema backward compatible by accepting both List[str] and List[{type:str}] to avoid breaking older clients.

Environment:

  • firecrawl-mcp version: 3.4.0
  • mcpo CLI version: 0.0.17
  • Python base image: 3.11-slim
  • Observed in OpenWebUI when connected through mcpo as a tool server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions