From 36750ca49b1b2fa43a3d7904416b876203a1850f Mon Sep 17 00:00:00 2001 From: Abhi <43648792+abhipatel12@users.noreply.github.com> Date: Wed, 6 Aug 2025 20:34:38 -0400 Subject: feat(agent): Introduce Foundational Subagent Architecture (#1805) Co-authored-by: Colt McAnlis --- packages/core/src/tools/tool-registry.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'packages/core/src/tools') 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 @@ -365,6 +365,22 @@ export class ToolRegistry { return declarations; } + /** + * 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. */ -- cgit v1.2.3