Before Tool Definitions Input • AI Agent SDK

BeforeToolDefinitionsInput: Input for BeforeToolDefinitions hooks.

BeforeToolDefinitionsInput

Defined in the events module.

AI Agent

Input for BeforeToolDefinitions hooks.

Fired right after the advertised tool definitions are assembled for a request and before they reach the LLM. Hooks should modify or filter the `tool_definitions list in place (e.g. data.tool_definitions[:] = ...`) to redact parameters, append usage guidance to descriptions, or constrain the advertised schema per request. This mirrors how BEFORE_LLM mutates its payload in place; only in-place mutations are adopted by the runtime.

Diagram

uses

returns

Agent

Tool: BeforeToolDefinitionsInput

Result

Properties

ResponseField List

No description available.

ResponseField str

No description available.

Internal & Generic Methods
  • to_dict: Generic utility method.

Source

View on GitHub

praisonaiagents/hooks/events.py at line 51


Related Documentation