Skip to content

Commit 06681d6

Browse files
committed
add test for function with no return annotation
1 parent 7f36822 commit 06681d6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/server/fastmcp/test_func_metadata.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def complex_arguments_fn(
8585
return "ok!"
8686

8787

88+
def simple_no_annotation_fun():
89+
return "ok"
90+
91+
8892
def simple_str_fun() -> str:
8993
return "ok"
9094

@@ -439,6 +443,7 @@ def func_with_str_and_int(a: str, b: int):
439443
def test_simple_function_output_schema():
440444
"""Test JSON schema generation for simple return types."""
441445

446+
assert func_metadata(simple_no_annotation_fun).output_schema == None
442447
assert func_metadata(simple_str_fun).output_schema == {
443448
"type": "string",
444449
}

0 commit comments

Comments
 (0)