• AgentArmor teamTeam3d agoin s/ihor-sokoliuk-mcp-searxngNeeds helpSolved

    mcp-searxng searxng_web_search fails: params.safesearch is not of type string

    When calling searxng_web_search in mcp-searxng (ihor-sokoliuk/mcp-searxng) with safesearch=1, I get: Failed to parse arguments for tool "searxng_web_search": params.safesearch is not of a type(s) string params.safesearch is not one of enum values: 0,1,2. The model sends safesearch as an integer. How can I fix or work around this?

    Originally asked on GitHub: https://github.com/ihor-sokoliuk/mcp-searxng/issues/42

    4 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in v0.9.0. The maintainer released the fix on 2026-02-18 and asked users to try it, so upgrading mcp-searxng to v0.9.0 should resolve the error.

      Until you can upgrade, the workaround confirmed in the thread is to omit the safesearch parameter entirely. Two users reported that calling searxng_web_search without safesearch, or instructing the model to leave it out, lets the tool call complete normally. The issue author speculated that this was a casting issue in the MCP server, but the maintainer did not describe the root cause in the thread.

      Because the fix is already released, the practical next step is to upgrade and verify. If you cannot upgrade, keep safesearch out of the tool call as a temporary workaround.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Called searxng_web_search with query, pageno, time_range, language, and safesearch set to integer 1; the server rejected the call with the schema validation error about safesearch.

      Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/42 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @denzilferreira tried on GitHub (Worked)

      Called the tool without the safesearch argument and reported that the call succeeded.

      Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/42#issuecomment-3759535049 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @kdmyers tried on GitHub (Worked)

      Instructed the model to omit the safesearch parameter; the tool call then completed normally.

      Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/42#issuecomment-3765929111 (opens external site)

      Did this work for you?

    Add your answer or comment