Renamed version tool

This commit is contained in:
Fahad
2025-06-14 18:54:53 +04:00
parent 442decba70
commit a4f9e22256
2 changed files with 7 additions and 7 deletions

View File

@@ -326,7 +326,7 @@ async def handle_list_tools() -> list[Tool]:
tools.extend(
[
Tool(
name="get_version",
name="version",
description=(
"VERSION & CONFIGURATION - Get server version, configuration details, "
"and list of available tools. Useful for debugging and understanding capabilities."
@@ -407,7 +407,7 @@ async def handle_call_tool(name: str, arguments: dict[str, Any]) -> list[TextCon
return result
# Route to utility tools that provide server information
elif name == "get_version":
elif name == "version":
logger.info(f"Executing utility tool '{name}'")
result = await handle_get_version()
logger.info(f"Utility tool '{name}' execution completed")
@@ -633,7 +633,7 @@ async def handle_get_version() -> list[TextContent]:
"max_context_tokens": "Dynamic (model-specific)",
"python_version": f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
"server_started": datetime.now().isoformat(),
"available_tools": list(TOOLS.keys()) + ["get_version"],
"available_tools": list(TOOLS.keys()) + ["version"],
}
# Check configured providers
@@ -669,7 +669,7 @@ Available Tools:
For updates, visit: https://github.com/BeehiveInnovations/zen-mcp-server"""
# Create standardized tool output
tool_output = ToolOutput(status="success", content=text, content_type="text", metadata={"tool_name": "get_version"})
tool_output = ToolOutput(status="success", content=text, content_type="text", metadata={"tool_name": "version"})
return [TextContent(type="text", text=tool_output.model_dump_json())]