diff options
| author | Luccas Paroni <[email protected]> | 2025-08-05 16:19:47 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-05 19:19:47 +0000 |
| commit | 2778c7d851740631b4dbacf907b63db26a6e1816 (patch) | |
| tree | f3361e32a59277ba5677ec2d06b6773d2f8c57c3 /docs/core/tools-api.md | |
| parent | b4651452293295020874dfb6ba6707a47c555175 (diff) | |
feat(core): Parse Multimodal MCP Tool responses (#5529)
Co-authored-by: Luccas Paroni <[email protected]>
Diffstat (limited to 'docs/core/tools-api.md')
| -rw-r--r-- | docs/core/tools-api.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/core/tools-api.md b/docs/core/tools-api.md index e10333d2..0b52191c 100644 --- a/docs/core/tools-api.md +++ b/docs/core/tools-api.md @@ -15,9 +15,11 @@ The Gemini CLI core (`packages/core`) features a robust system for defining, reg - `execute()`: The core method that performs the tool's action and returns a `ToolResult`. - **`ToolResult` (`tools.ts`):** An interface defining the structure of a tool's execution outcome: - - `llmContent`: The factual string content to be included in the history sent back to the LLM for context. + - `llmContent`: The factual content to be included in the history sent back to the LLM for context. This can be a simple string or a `PartListUnion` (an array of `Part` objects and strings) for rich content. - `returnDisplay`: A user-friendly string (often Markdown) or a special object (like `FileDiff`) for display in the CLI. +- **Returning Rich Content:** Tools are not limited to returning simple text. The `llmContent` can be a `PartListUnion`, which is an array that can contain a mix of `Part` objects (for images, audio, etc.) and `string`s. This allows a single tool execution to return multiple pieces of rich content. + - **Tool Registry (`tool-registry.ts`):** A class (`ToolRegistry`) responsible for: - **Registering Tools:** Holding a collection of all available built-in tools (e.g., `ReadFileTool`, `ShellTool`). - **Discovering Tools:** It can also discover tools dynamically: |
