async def test_list_prompts(client: BasicMCPClient):
    """Test listing prompts from the server."""
    prompts = await client.list_prompts()

    # Check that we got a list of prompts
    assert isinstance(prompts, types.ListPromptsResult)
    assert len(prompts.prompts) > 0

    # Verify some expected prompts are present
    prompt_names = [prompt.name for prompt in prompts.prompts]
    assert "simple_greeting" in prompt_names
    assert "personalized_greeting" in prompt_names
    assert "analyze_data" in prompt_names
Test listing prompts from the server.
llama-index-integrations/tools/llama-index-tools-mcp/tests/test_client.py