Skip to content

Commit 020f73e

Browse files
committed
HTTP MCP: Only expose translate_texts tool, remove base64 tools
Claude.ai browser works better with the simple text-in/text-out approach. Base64 tools remain available for stdio MCP (Claude Desktop).
1 parent 84005e6 commit 020f73e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/rosetta/api/mcp_http.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ def create_error(id: int | str | None, code: int, message: str, data: Any = None
9696

9797
# Tool handlers mapping
9898
TOOL_HANDLERS = {
99-
"translate_excel": tool_translate_excel,
100-
"get_excel_sheets": tool_get_sheets,
101-
"count_translatable_cells": tool_count_cells,
102-
"preview_cells": tool_preview_cells,
103-
"estimate_translation_cost": tool_estimate_cost,
10499
"translate_texts": tool_translate_texts,
105100
}
106101

102+
# For HTTP/browser MCP, only expose the simple translate_texts tool
103+
# The base64 tools are too complex for Claude.ai browser
104+
HTTP_TOOLS = [tool for tool in TOOLS if tool.name == "translate_texts"]
105+
107106

108107
async def handle_initialize(params: dict | None) -> dict:
109108
"""Handle initialize request."""
@@ -122,7 +121,7 @@ async def handle_initialize(params: dict | None) -> dict:
122121
async def handle_tools_list(params: dict | None) -> dict:
123122
"""Handle tools/list request."""
124123
tools = []
125-
for tool in TOOLS:
124+
for tool in HTTP_TOOLS:
126125
tools.append({
127126
"name": tool.name,
128127
"description": tool.description,

0 commit comments

Comments
 (0)