mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Update docs
This commit is contained in:
parent
5520102821
commit
c412a63d4e
7 changed files with 575 additions and 46 deletions
|
|
@ -920,12 +920,12 @@ class TestToolOutputSchema:
|
|||
mcp = FastMCP()
|
||||
|
||||
@mcp.tool(output_schema=None)
|
||||
def f() -> dict[str, str]:
|
||||
return {"message": "Hello, world!"}
|
||||
def f() -> int:
|
||||
return 42
|
||||
|
||||
async with Client(mcp) as client:
|
||||
result = await client.call_tool("f", {})
|
||||
assert json.loads(result.content[0].text) == {"message": "Hello, world!"} # type: ignore[attr-defined]
|
||||
assert result.content[0].text == "42" # type: ignore[attr-defined]
|
||||
assert result.structured_content is None
|
||||
assert result.data is None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue