Skip to content

Commit 1006e2a

Browse files
committed
Add output schema generation and related tests
1 parent 35db624 commit 1006e2a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

src/mcp/server/fastmcp/server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def _setup_handlers(self) -> None:
174174
async def list_tools(self) -> list[MCPTool]:
175175
"""List all available tools."""
176176
tools = self._tool_manager.list_tools()
177-
logger.info(f"list tools: {tools}")
178177
return [
179178
MCPTool(
180179
name=info.name,
@@ -203,7 +202,6 @@ async def call_tool(
203202
"""Call a tool by name with arguments."""
204203
context = self.get_context()
205204
result = await self._tool_manager.call_tool(name, arguments, context=context)
206-
logger.info(f"call tool: {name} with args: {arguments} -> {result}")
207205
converted_result = _convert_to_content(result)
208206
return converted_result
209207

src/mcp/server/fastmcp/tools/base.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import inspect
44
from collections.abc import Callable
55
from typing import TYPE_CHECKING, Any, get_origin
6-
from mcp.server.fastmcp.utilities.logging import get_logger
76

87
from pydantic import BaseModel, Field
98

@@ -16,8 +15,6 @@
1615
from mcp.server.session import ServerSessionT
1716
from mcp.shared.context import LifespanContextT
1817

19-
logger = get_logger(__name__)
20-
2118
class Tool(BaseModel):
2219
"""Internal tool registration info."""
2320

@@ -77,8 +74,6 @@ def from_function(
7774

7875
output_schema = getattr(func_arg_metadata, "outputSchema", None)
7976

80-
logger.info(f"output schema: {output_schema}")
81-
8277
return cls(
8378
fn=fn,
8479
name=func_name,

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ async def call_fn_with_arg_validation(
6161

6262
arguments_parsed_dict |= arguments_to_pass_directly or {}
6363

64-
logger.info(
65-
"Calling function with arguments: %s",
66-
arguments_parsed_dict,
67-
)
68-
logger.info(f"Function is async: ${fn}")
6964
if fn_is_async:
7065
if isinstance(fn, Awaitable):
7166
return await fn
@@ -187,7 +182,6 @@ def func_metadata(
187182
try:
188183
# Handle forward references
189184
return_type = _get_typed_annotation(return_annotation, globalns)
190-
logger.info(f"return_type: {return_type}")
191185
# Special case for None
192186
if return_type is type(None): # noqa: E721
193187
output_schema = {"type": "null"}

0 commit comments

Comments
 (0)