diff options
| author | Abhi <[email protected]> | 2025-08-06 20:34:38 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-07 00:34:38 +0000 |
| commit | 36750ca49b1b2fa43a3d7904416b876203a1850f (patch) | |
| tree | 876276dc4bd2c76a385944f0fd39f252357590ed /packages/core/src/tools/tool-registry.ts | |
| parent | d6a7334279366762787bed6a5bd08a125c7c3ba8 (diff) | |
feat(agent): Introduce Foundational Subagent Architecture (#1805)
Co-authored-by: Colt McAnlis <[email protected]>
Diffstat (limited to 'packages/core/src/tools/tool-registry.ts')
| -rw-r--r-- | packages/core/src/tools/tool-registry.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/core/src/tools/tool-registry.ts b/packages/core/src/tools/tool-registry.ts index 73b427d4..c77fab8c 100644 --- a/packages/core/src/tools/tool-registry.ts +++ b/packages/core/src/tools/tool-registry.ts @@ -366,6 +366,22 @@ export class ToolRegistry { } /** + * Retrieves a filtered list of tool schemas based on a list of tool names. + * @param toolNames - An array of tool names to include. + * @returns An array of FunctionDeclarations for the specified tools. + */ + getFunctionDeclarationsFiltered(toolNames: string[]): FunctionDeclaration[] { + const declarations: FunctionDeclaration[] = []; + for (const name of toolNames) { + const tool = this.tools.get(name); + if (tool) { + declarations.push(tool.schema); + } + } + return declarations; + } + + /** * Returns an array of all registered and discovered tool instances. */ getAllTools(): AnyDeclarativeTool[] { |
