From 4134b38d62f5e838303e684cf95d4c46a8123844 Mon Sep 17 00:00:00 2001 From: Fahad Date: Sun, 8 Jun 2025 21:39:54 +0400 Subject: [PATCH] docs: add guidance for handling large content in analyze_code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update tool description to recommend file paths for large content - Add note in README about terminal output behavior - Explain that MCP client shows full parameters in terminal - Guide users to save large content to files first This helps users avoid terminal clutter when analyzing large code snippets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 2 ++ gemini_server.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aff5345..35bee91 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,8 @@ Specialized tool for analyzing large files or multiple files that exceed Claude' "Have Gemini review these files together: auth.py, users.py, permissions.py" ``` +**Note on Terminal Output:** When using direct code input, the MCP client displays the full content in the terminal. For better readability with large content, save it to a file first and provide the file path instead. + ### `list_models` Lists available Gemini models (defaults to 2.5 Pro Preview). diff --git a/gemini_server.py b/gemini_server.py index 1934d8f..9676305 100755 --- a/gemini_server.py +++ b/gemini_server.py @@ -237,7 +237,7 @@ async def handle_list_tools() -> List[Tool]: ), Tool( name="analyze_code", - description="Analyze code files or snippets with Gemini's 1M context window", + description="Analyze code files or snippets with Gemini's 1M context window. For large content, use file paths to avoid terminal clutter.", inputSchema={ "type": "object", "properties": { @@ -248,7 +248,7 @@ async def handle_list_tools() -> List[Tool]: }, "code": { "type": "string", - "description": "Direct code content to analyze (alternative to files)", + "description": "Direct code content to analyze (use for small snippets only; prefer files for large content)", }, "question": { "type": "string",