List Available Tools • AI Agent SDK

list_available_tools: List only currently available tools (those that pass availability checks).

list_available_tools

Method

</div>

This is a method of the ToolRegistry class in the registry module.

List only currently available tools (those that pass availability checks).

Uses TTL cache to avoid expensive availability checks on every call.

Diagram

uses

returns

Agent

Tool: list_available_tools

Result

Signature

python
def list_available_tools(context: Optional[Dict[str, Any]], ttl_seconds: Optional[float]) -> List[Union[BaseTool, Callable]]

Parameters

ParamField Optional

Optional context for availability checks (unused currently)

ParamField Optional[float]

Cache TTL override (default: 30.0 seconds)

Returns

ResponseField List[Union[BaseTool, Callable]]

List of available tools (both BaseTool instances and callables)

Uses

  • time.time
  • check_availability
  • logging.debug
  • logging.warning

Used By

Source

View on GitHub

praisonaiagents/tools/registry.py at line 349


Related Documentation