Skip to main content
Glama
test_echo.py949 B
"""Tests for echo tools.""" from fastmcp.client import Client async def test_echo_with_data(client: Client): """Test echo tool returns input data.""" result = await client.call_tool("echo", {"data": {"message": "hello", "count": 42}}) assert result.data == {"message": "hello", "count": 42} async def test_echo_empty(client: Client): """Test echo tool with no data returns empty object.""" result = await client.call_tool("echo", {}) assert result.structured_content == {} async def test_echo_none(client: Client): """Test echo tool with None data returns empty object.""" result = await client.call_tool("echo", {"data": None}) assert result.structured_content == {} async def test_echo_context(client: Client): """Test echo_context tool returns request context.""" result = await client.call_tool("echo_context", {}) assert "request_id" in result.data assert "client_id" in result.data

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bugffet/mcpbin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server