MCPcopy Index your code
hub / github.com/AI45Lab/Code / pending_by_tool_id

Function pending_by_tool_id

sdk/python/examples/hitl_confirmation_loop.py:29–34  ·  view source on GitHub ↗
(session: Any, tool_id: str | None)

Source from the content-addressed store, hash-verified

27
28
29def pending_by_tool_id(session: Any, tool_id: str | None) -> dict[str, Any] | None:
30 pending = session.pending_confirmations()
31 for item in pending:
32 if item.get("tool_id") == tool_id:
33 return item
34 return pending[0] if pending else None
35
36
37def confirm_from_cli(session: Any, event: Any) -> None:

Callers 1

confirm_from_cliFunction · 0.85

Calls 2

pending_confirmationsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected