We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b28fba commit 6244899Copy full SHA for 6244899
src/mcp/server/fastmcp/utilities/func_metadata.py
@@ -183,13 +183,9 @@ def func_metadata(
183
__base__=ArgModelBase,
184
)
185
186
- if sig.return_annotation is inspect.Parameter.empty:
187
- pass
188
- elif sig.return_annotation is None:
189
190
- elif sig.return_annotation is types.Image:
191
192
- else:
+ # TODO this could be moved to a constant or passed in as param as per skip_names
+ ignore = [inspect.Parameter.empty, None, types.Image]
+ if sig.return_annotation not in ignore:
193
output_schema = TypeAdapter(sig.return_annotation).json_schema()
194
195
return FuncMetadata(arg_model=arguments_model, output_schema=output_schema)
0 commit comments