Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mcp/client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def unsubscribe_resource(self, uri: AnyUrl) -> types.EmptyResult:
)

async def call_tool(
self, name: str, arguments: dict | None = None
self, name: str, arguments: dict[str, Any] | None = None
) -> types.CallToolResult:
"""Send a tools/call request."""
return await self.send_request(
Expand Down
4 changes: 3 additions & 1 deletion src/mcp/server/fastmcp/tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def from_function(
context_kwarg=context_kwarg,
)

async def run(self, arguments: dict, context: "Context | None" = None) -> Any:
async def run(
self, arguments: dict[str, Any], context: "Context | None" = None
) -> Any:
"""Run the tool with arguments."""
try:
return await self.fn_metadata.call_fn_with_arg_validation(
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/server/fastmcp/tools/tool_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def add_tool(
return tool

async def call_tool(
self, name: str, arguments: dict, context: "Context | None" = None
self, name: str, arguments: dict[str, Any], context: "Context | None" = None
) -> Any:
"""Call a tool by name with arguments."""
tool = self.get_tool(name)
Expand Down
Loading