Skip to content

Commit f12f27a

Browse files
committed
Remove "unconditionally" from conditional description
The current docstrings regarding tool creation read, "unconditionally creates a structured tool (return type annotation permitting)". If the return type annotation limits whether or not a structured tool can be created, then creation of a structured tool is *conditional* upon the presence of a proper return type annotation. Therefore, these descriptions should not include the word "unconditionally", as it is inaccurate and contradictory.
1 parent 07ae8c0 commit f12f27a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mcp/server/fastmcp/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def add_tool(
360360
annotations: Optional ToolAnnotations providing additional tool information
361361
structured_output: Controls whether the tool's output is structured or unstructured
362362
- If None, auto-detects based on the function's return type annotation
363-
- If True, unconditionally creates a structured tool (return type annotation permitting)
363+
- If True, creates a structured tool (return type annotation permitting)
364364
- If False, unconditionally creates an unstructured tool
365365
"""
366366
self._tool_manager.add_tool(
@@ -393,7 +393,7 @@ def tool(
393393
annotations: Optional ToolAnnotations providing additional tool information
394394
structured_output: Controls whether the tool's output is structured or unstructured
395395
- If None, auto-detects based on the function's return type annotation
396-
- If True, unconditionally creates a structured tool (return type annotation permitting)
396+
- If True, creates a structured tool (return type annotation permitting)
397397
- If False, unconditionally creates an unstructured tool
398398
399399
Example:

src/mcp/server/fastmcp/utilities/func_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def func_metadata(
187187
the model.
188188
structured_output: Controls whether the tool's output is structured or unstructured
189189
- If None, auto-detects based on the function's return type annotation
190-
- If True, unconditionally creates a structured tool (return type annotation permitting)
190+
- If True, creates a structured tool (return type annotation permitting)
191191
- If False, unconditionally creates an unstructured tool
192192
193193
If structured, creates a Pydantic model for the function's result based on its annotation.

0 commit comments

Comments
 (0)