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

Function _toggle_tool

astrbot/dashboard/api/tools.py:110–118  ·  view source on GitHub ↗
(
    tool_id: str,
    enabled: bool,
    service: ToolsService,
)

Source from the content-addressed store, hash-verified

108
109
110async def _toggle_tool(
111 tool_id: str,
112 enabled: bool,
113 service: ToolsService,
114):
115 return await _run(
116 lambda: service.toggle_tool({"name": tool_id, "activate": enabled}),
117 result_as_message=True,
118 )
119
120
121async def _create_mcp_server(body: dict[str, Any], service: ToolsService):

Callers 2

set_tool_enabledFunction · 0.85
toggle_dashboard_toolFunction · 0.85

Calls 2

toggle_toolMethod · 0.80
_runFunction · 0.70

Tested by

no test coverage detected