MCPcopy
hub / github.com/AstrBotDevs/AstrBot / _run

Function _run

astrbot/dashboard/api/tools.py:98–107  ·  view source on GitHub ↗
(
    operation, *, result_as_message: bool = False, message: str | None = None
)

Source from the content-addressed store, hash-verified

96
97
98async def _run(
99 operation, *, result_as_message: bool = False, message: str | None = None
100):
101 try:
102 result = await run_maybe_async(operation)
103 if result_as_message:
104 return ok(None, str(result))
105 return ok(result, message)
106 except ToolsServiceError as exc:
107 _raise_tools_error(exc)
108
109
110async def _toggle_tool(

Callers 14

_toggle_toolFunction · 0.70
_create_mcp_serverFunction · 0.70
_update_mcp_serverFunction · 0.70
_delete_mcp_serverFunction · 0.70
_test_mcp_serverFunction · 0.70
list_toolsFunction · 0.70
set_tool_permissionFunction · 0.70
list_mcp_serversFunction · 0.70
list_dashboard_toolsFunction · 0.70

Calls 3

run_maybe_asyncFunction · 0.90
okFunction · 0.90
_raise_tools_errorFunction · 0.85

Tested by 1