Call a tool by name with arguments.
(
self, name: str, arguments: dict[str, Any], context: Context[LifespanResultT, Any] | None = None
)
| 387 | ] |
| 388 | |
| 389 | async def call_tool( |
| 390 | self, name: str, arguments: dict[str, Any], context: Context[LifespanResultT, Any] | None = None |
| 391 | ) -> CallToolResult | InputRequiredResult: |
| 392 | """Call a tool by name with arguments.""" |
| 393 | if context is None: |
| 394 | context = Context(mcp_server=self) |
| 395 | return await self._tool_manager.call_tool(name, arguments, context, convert_result=True) |
| 396 | |
| 397 | async def list_resources(self) -> list[MCPResource]: |
| 398 | """List all available resources.""" |