Skip to main content
Glama
i-dot-ai
by i-dot-ai
test_api.py1.75 kB
import json import pytest from agents.mcp import MCPServerStreamableHttp @pytest.mark.asyncio async def test_get_detailed_member_information(test_mcp_client: MCPServerStreamableHttp): result = await test_mcp_client.call_tool( tool_name="get_detailed_member_information", arguments={ # Sir Iain Duncan Smith "member_id": 152, "include_committee_membership": True, }, ) result = json.loads(result.content[0].text) assert result is not None committee_membership = result["committee_membership"] assert isinstance(committee_membership, list) assert len(committee_membership) >= 4 @pytest.mark.asyncio async def test_list_all_committees(test_mcp_client: MCPServerStreamableHttp): result = await test_mcp_client.call_tool( tool_name="list_all_committees", arguments={}, ) result = json.loads(result.content[0].text) assert result is not None assert len(result) > 0 @pytest.mark.asyncio @pytest.mark.parametrize( ("committee_id", "expected"), [ # Legislative scrutiny focused committee (760, {"name": "City of London (Markets) Bill"}), # Commons select committee (327, {"name": "Public Administration and Constitutional Affairs Committee"}), ], ) async def test_get_committee_details(test_mcp_client: MCPServerStreamableHttp, committee_id: int, expected: dict): result = await test_mcp_client.call_tool( tool_name="get_committee_details", arguments={ "committee_id": committee_id, }, ) result = json.loads(result.content[0].text) assert result is not None assert result["basic_committee_info"]["name"] == expected["name"]

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/i-dot-ai/parliament-mcp'

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