diff --git a/docs/tools-custom/function-tools.md b/docs/tools-custom/function-tools.md index 4a47cad74..f39bc5460 100644 --- a/docs/tools-custom/function-tools.md +++ b/docs/tools-custom/function-tools.md @@ -223,6 +223,14 @@ While you have considerable flexibility in defining your function, remember that * **Build for Parallel Execution:** Improve function calling performance when multiple tools are run by building for asynchronous operation. For information on enabling parallel execution for tools, see [Increase tool performance with parallel execution](/adk-docs/tools-custom/performance/). +## Simplified Tool Declaration with JSON Schema (Experimental) + +ADK now offers a simplified way to declare function tools by generating a JSON schema from your function's signature using Pydantic. This feature can be enabled via a feature flag. + +When enabled, `build_function_declaration` will automatically generate a JSON schema for your function's parameters, which simplifies the declaration process and provides more accurate type information to the LLM. + +This feature is currently experimental and can be enabled by setting the `ADK_ENABLE_JSON_SCHEMA_FOR_FUNC_DECL` environment variable to `true`. + ## Long Running Function Tools {#long-run-tool} This tool is designed to help you start and manage tasks that are handled outside the operation of your agent workflow, and require a significant amount of processing time, without blocking the agent's execution. This tool is a subclass of `FunctionTool`. @@ -481,4 +489,4 @@ The `AgentTool` class provides the following attributes for customizing its beha 3. Behind the scenes, the `main_agent` will call the `summary_agent` with the long text as input. 4. The `summary_agent` will process the text according to its instruction and generate a summary. 5. **The response from the `summary_agent` is then passed back to the `main_agent`.** -6. The `main_agent` can then take the summary and formulate its final response to the user (e.g., "Here's a summary of the text: ...") +6. The `main_agent` can then take the summary and formulate its final response to the user (e.g., "Here's a summary of the text: ...") \ No newline at end of file