Skip to content

search prompt example for sources field causes HTTP 422 #99

@huzhekun

Description

@huzhekun

when using a chatbot to call the search function via this MCP the request it sent was

{
  "query": "Tesla stock price current TSLA",
  "limit": 5,
  "sources": [
    "web"
  ]
}

and the response was

{
  "error": "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\"}]}"
}

when the model corrected to

{
  "query": "Tesla stock price current TSLA",
  "limit": 5,
  "sources": [
    {
      "type": "web"
    }
  ]
}

the response returned was correct

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