feat: add version checking capability to MCP server

- Add version metadata (__version__, __updated__, __author__)
- Create get_version tool that returns server information
- Include Python version, start time, and configuration details
- Add comprehensive tests for version functionality
- Update existing tests to handle new tool count

Now you can check the server version from Claude by asking:
"Can you get the version of the Gemini MCP server?"

Version: 2.2.0
Updated: 2025-06-08
Author: Fahad Gilani

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-08 21:07:41 +04:00
parent f8d8c8a412
commit 9a3c476056
3 changed files with 126 additions and 1 deletions

View File

@@ -139,12 +139,13 @@ class TestToolHandlers:
async def test_handle_list_tools(self):
"""Test listing available tools"""
tools = await handle_list_tools()
assert len(tools) == 3
assert len(tools) == 4 # Updated to include get_version
tool_names = [tool.name for tool in tools]
assert "chat" in tool_names
assert "analyze_code" in tool_names
assert "list_models" in tool_names
assert "get_version" in tool_names
@pytest.mark.asyncio
async def test_handle_call_tool_unknown(self):