MCP server tools/list response returns cacheScope='' which breaks Hermes Agent mcp_types validation

#20535 · open · 1 comments

View on GitHub ↗

Onur-Cansever

## Bug Description RAGFlow v1.0.0-rc1 MCP server (endpoint: /api/v1/mcp) returns `cacheScope: ""` (empty string) in the `tools/list` response. Hermes Agent uses the `mcp_types` Python package which validates `cacheScope` as `Literal["public", "private"]`. An empty string causes a pydantic ValidationError that prevents the MCP server from connecting. ## Error ``` ValidationError: 1 validation error for ListToolsResult cacheScope Input should be 'public' or 'private' [type=literal_error, input_value=''] ``` ## Environment - RAGFlow version: v1.0.0-rc1 - MCP endpoint: /api/v1/mcp (Streamable HTTP) - Hermes Agent: latest (mcp_types package) ## Suggested Fix Return `cacheScope: "private"` instead of `cacheScope: ""` in the tools/list response. Per the MCP spec (2026-07-28), `cacheScope` should be either `"public"` or `"private"`.

Comments

leilei3167

Thanks for the report. I'll take a look. tools/list is sending an empty cacheScope, which clients reject. I'll set it to private.