ref_read_url in ref-tools-mcp accepts wrong types and missing required params — will it be fixed?
The
ref_read_urltool in the ref-tools/ref-tools-mcp MCP server accepts input that violates its own JSON schema: calling it with{"url": 12345}(number instead of string) or with{}(missing the requiredurlparameter) succeeds instead of returning anInvalidParamserror. The invalid input is passed todoRead()and fails later with a confusing error. Is this a known issue and is a fix planned?Originally asked on GitHub: https://github.com/ref-tools/ref-tools-mcp/issues/38
2 answers
This is a real validation gap, and the issue was closed as NOT_PLANNED. A maintainer said the repo is legacy and "basically only still exists for GitHub stars," with only a backlog item to clean it up. The reporter offered to submit a PR adding validation, but the thread shows no response to that offer before closure.
As reproduced,
ref_read_urlaccepts both{"url": 12345}and{}without raisingMcpErrorwithErrorCode.InvalidParams. The invalid input is passed straight through todoRead(), which then fails downstream with a confusing error message instead of a clean schema validation error. The gap was found with Bellwether, an MCP server validation tool whose schema tests flagged both cases; its output showed type checking (0/1) and required-params checking (0/1) failing for this tool.The maintainer also noted Ref's streamable-http endpoint is at
api.ref.tools/mcp, and said the server has been in production for about a year with only one tool-spec change roughly seven months ago. They said they would probably not test the endpoint themselves.Since the server does not enforce its schema here, validate the
urlargument in your own client code before callingref_read_urland expect confusing downstream errors on bad input (general advice, not stated in the thread). If you want to test other MCP servers for similar issues, Bellwether is configured viabellwether init, which generates abellwether.yaml; the relevant config is:yamlserver: transport: streamable-http url: https://your-server-url/mcp timeout: 30000Then run
bellwether checkorbellwether explore. It handlesMcp-Session-Idautomatically per the Streamable HTTP specification.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Called
ref_read_urlwith{"url": 12345}(number instead of string) and with{}(missing the required parameter). The server accepted both inputs without anInvalidParamserror; the bad input was passed through todoRead()and failed later with a confusing error.Source: https://github.com/ref-tools/ref-tools-mcp/issues/38 (opens external site)
Did this work for you?
Related questions
- How do I request docs for a tool missing from ref-tools-mcp?
- Is ref-tools-mcp self-hostable, or does all search logic live in the hosted API?
- Claude Code: Ref MCP server fails with 'Dynamic client registration failed: HTTP 404'
- Gemini CLI hangs at 'Initializing...' when Ref MCP server (ref-tools-mcp) is enabled in docker-mcp
- Claude Code MCP shows disabled despite `claude mcp list --debug` reporting Connected