π The fast, Pythonic way to build MCP servers and clients.
Clean up docs
Jeremiah Lowin5ddb54bbd4a0
diff --git a/docs/clients/client.mdx b/docs/clients/client.mdxindex f9ed5ca1b..0f5dc0f1e 100644--- a/docs/clients/client.mdx+++ b/docs/clients/client.mdx@@ -176,7 +176,7 @@ async with client:# Execute a toolresult = await client.call_tool("multiply", {"a": 5, "b": 3})- print(result[0].text) # "15"+ print(result.data) # 15```See [Tools](/clients/tools) for detailed documentation.diff --git a/docs/patterns/testing.mdx b/docs/patterns/testing.mdxindex 910ac6686..82e4ee1c2 100644--- a/docs/patterns/testing.mdx+++ b/docs/patterns/testing.mdx@@ -22,7 +22,7 @@ from fastmcp import FastMCP, Clientdef mcp_server():server = FastMCP("TestServer")+ @server.tooldef greet(name: str) -> str:return f"Hello, {name}!"@@ -32,7 +32,7 @@ async def test_tool_functionality(mcp_server):# Pass the server directly to the Client constructorasync with Client(mcp_server) as client:result = await client.call_tool("greet", {"name": "World"})- assert result[0].text == "Hello, World!"+ assert result.data == "Hello, World!"```This pattern creates a direct connection between the client and server, allowing you to test your server's functionality efficiently.diff --git a/docs/servers/composition.mdx b/docs/servers/composition.mdxindex cdbe23186..3d45da37c 100644--- a/docs/servers/composition.mdx+++ b/docs/servers/composition.mdx@@ -180,7 +180,7 @@ async def test_dynamic_mount():async with Client(main_mcp) as client:result = await client.call_tool("dynamic_added_later")- print("Result:", result[0].text)+ print("Result:", result.data)# Shows: "Tool Added Dynamically!"if __name__ == "__main__":diff --git a/docs/tutorials/rest-api.mdx b/docs/tutorials/rest-api.mdxindex cb1453644..a0efeae62 100644--- a/docs/tutorials/rest-api.mdx+++ b/docs/tutorials/rest-api.mdx@@ -114,7 +114,7 @@ async def main():# Call one of the generated toolsprint("\n\nCalling tool 'get_user_by_id'...")user = await client.call_tool("get_user_by_id", {"id": 1})- print(f"Result:\n{user[0].text}")+ print(f"Result:\n{user.data}")if __name__ == "__main__":asyncio.run(main())