atlas/home-voice-agent/mcp-server/test_all_tools.sh
ilia 4b9ffb5ddf docs: Update architecture and add new documentation for LLM and MCP
- Enhanced `ARCHITECTURE.md` with details on LLM models for work (Llama 3.1 70B Q4) and family agents (Phi-3 Mini 3.8B Q4).
- Introduced new documents:
  - `ASR_EVALUATION.md` for ASR engine evaluation and selection.
  - `HARDWARE.md` outlining hardware requirements and purchase plans.
  - `IMPLEMENTATION_GUIDE.md` for Milestone 2 implementation steps.
  - `LLM_CAPACITY.md` assessing VRAM and context window limits.
  - `LLM_MODEL_SURVEY.md` surveying open-weight LLM models.
  - `LLM_USAGE_AND_COSTS.md` detailing LLM usage and operational costs.
  - `MCP_ARCHITECTURE.md` describing the Model Context Protocol architecture.
  - `MCP_IMPLEMENTATION_SUMMARY.md` summarizing MCP implementation status.

These updates provide comprehensive guidance for the next phases of development and ensure clarity in project documentation.
2026-01-05 23:44:16 -05:00

64 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
# Test all MCP tools
MCP_URL="http://localhost:8000/mcp"
echo "=========================================="
echo "Testing MCP Server - All Tools"
echo "=========================================="
echo ""
# Test 1: List all tools
echo "1. Testing tools/list..."
TOOLS=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}')
TOOL_COUNT=$(echo "$TOOLS" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data['result']['tools']))" 2>/dev/null)
echo " ✓ Found $TOOL_COUNT tools"
echo ""
# Test 2: Echo tool
echo "2. Testing echo tool..."
RESULT=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "echo", "arguments": {"text": "Hello!"}}, "id": 2}')
echo "$(echo "$RESULT" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['result']['content'][0]['text'])" 2>/dev/null)"
echo ""
# Test 3: Get current time
echo "3. Testing get_current_time tool..."
RESULT=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_current_time", "arguments": {}}, "id": 3}')
echo "$(echo "$RESULT" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['result']['content'][0]['text'])" 2>/dev/null | head -1)"
echo ""
# Test 4: Get date
echo "4. Testing get_date tool..."
RESULT=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_date", "arguments": {}}, "id": 4}')
echo "$(echo "$RESULT" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['result']['content'][0]['text'])" 2>/dev/null | head -1)"
echo ""
# Test 5: Get timezone info
echo "5. Testing get_timezone_info tool..."
RESULT=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_timezone_info", "arguments": {}}, "id": 5}')
echo "$(echo "$RESULT" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['result']['content'][0]['text'])" 2>/dev/null | head -1)"
echo ""
# Test 6: Convert timezone
echo "6. Testing convert_timezone tool..."
RESULT=$(curl -s -X POST "$MCP_URL" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "convert_timezone", "arguments": {"to_timezone": "Europe/London"}}, "id": 6}')
echo "$(echo "$RESULT" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data['result']['content'][0]['text'])" 2>/dev/null | head -1)"
echo ""
echo "=========================================="
echo "✅ All 6 tools tested successfully!"
echo "=========================================="