MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _api_update_roles

Function _api_update_roles

deployments/desktop/server.py:251–263  ·  view source on GitHub ↗
(_query_params: Dict[str, Any], body: Dict[str, Any])

Source from the content-addressed store, hash-verified

249 )
250
251
252def _api_update_roles(_query_params: Dict[str, Any], body: Dict[str, Any]) -> Dict[str, Any]:
253 action = str(body.get("action") or "").strip().lower()
254 if action == "create":
255 return agents.create_role(
256 role_name=str(body.get("role_name") or "").strip(),
257 description=str(body.get("description") or "").strip(),
258 feishu_chat_id=str(body.get("feishu_chat_id") or "").strip(),
259 )
260 if action == "switch":
261 return agents.switch_role(str(body.get("role_name") or "").strip())
262 if action == "delete":
263 return agents.delete_role(str(body.get("role_name") or "").strip())
264 raise ValueError("action must be create, switch, or delete")
265
266

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected