Skip to content

Commit 9d8d998

Browse files
committed
Fix more types
1 parent 775f879 commit 9d8d998

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/mcp/client/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def unsubscribe_resource(self, uri: AnyUrl) -> types.EmptyResult:
219219
)
220220

221221
async def call_tool(
222-
self, name: str, arguments: dict | None = None
222+
self, name: str, arguments: dict[str, Any] | None = None
223223
) -> types.CallToolResult:
224224
"""Send a tools/call request."""
225225
return await self.send_request(

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def from_function(
6868
context_kwarg=context_kwarg,
6969
)
7070

71-
async def run(self, arguments: dict, context: "Context | None" = None) -> Any:
71+
async def run(
72+
self, arguments: dict[str, Any], context: "Context | None" = None
73+
) -> Any:
7274
"""Run the tool with arguments."""
7375
try:
7476
return await self.fn_metadata.call_fn_with_arg_validation(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def add_tool(
4343
return tool
4444

4545
async def call_tool(
46-
self, name: str, arguments: dict, context: "Context | None" = None
46+
self, name: str, arguments: dict[str, Any], context: "Context | None" = None
4747
) -> Any:
4848
"""Call a tool by name with arguments."""
4949
tool = self.get_tool(name)

0 commit comments

Comments
 (0)