From 58a88f2dcf1e2860d6e476c63fbb893b3be11ebc Mon Sep 17 00:00:00 2001 From: Mohak Gupta Date: Sun, 16 Aug 2026 00:01:48 +0530 Subject: [PATCH] Remove dead _validate_topic function Zero call sites in src/ -- both places that could use it (get_context_instructions, query_instructions) hardcode topic=None with a comment explaining topic filtering was intentionally disabled to reduce noise. Leaving the validator in place implies topic filtering is still active, which is misleading. Fixes #256 --- src/rosetta-mcp-server/rosetta_mcp/server.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/rosetta-mcp-server/rosetta_mcp/server.py b/src/rosetta-mcp-server/rosetta_mcp/server.py index 7ff4fc35..16832a95 100644 --- a/src/rosetta-mcp-server/rosetta_mcp/server.py +++ b/src/rosetta-mcp-server/rosetta_mcp/server.py @@ -542,13 +542,6 @@ async def _build_call_context(tool_name: str, params: dict[str, Any], ctx: Conte ) -def _validate_topic(topic: str | None) -> str | None: - # >10 is intentional: AI will always add more words, gives extra word buffer - if topic and len(topic.split()) > 10: - return "Error: topic must be 10 words or less" - return None - - # This is required, as sometimes models hallucinate tags as single string, but we don't want tool contract to be different (as it causes more hallucinations) def _normalize_tags(tags: list[str] | str | None) -> tuple[list[str] | None, str | None]: """Normalize single-string or list tag input for tool wrappers."""