From a26f90cef9ee80b1820a341bc78d4c8ffa9c3a02 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Mon, 20 Apr 2026 18:07:54 +0530 Subject: [PATCH] refactor(searchSpecSections): remove content field from result - Eliminated `content` property from `searchSpecResultSchema` and output mapping. - Updated `toolMetadata` description to reflect that only section references are returned and content must be fetched via `ask262_get_section_content`. - Adjusted TypeScript code accordingly. --- src/agent-tools/searchSpecSections.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/agent-tools/searchSpecSections.ts b/src/agent-tools/searchSpecSections.ts index e620e9b..eb14207 100644 --- a/src/agent-tools/searchSpecSections.ts +++ b/src/agent-tools/searchSpecSections.ts @@ -17,7 +17,6 @@ const searchSpecResultSchema = z.object({ .describe("Vector distance from query (lower = more similar)"), partIndex: z.number().nullable(), totalParts: z.number().nullable(), - content: z.string(), }); const searchSpecOutputSchema = z.object({ @@ -31,7 +30,8 @@ const searchSpecOutputSchema = z.object({ export const toolMetadata = { description: "Vector search the ECMAScript specification for sections relevant to a query. " + - "Returns an array of sections with sectionId, sectionTitle, score, partIndex, totalParts, and content. " + + "Returns an array of section references (sectionId, sectionTitle, vectorDistance, partIndex, totalParts). " + + "Use ask262_get_section_content to retrieve the actual content for a section. " + "partIndex and totalParts indicate which chunk of a multi-part section this is " + "(0-indexed, partIndex+1/totalParts), null if single-part.", args: { @@ -86,7 +86,6 @@ export function createSearchSpecSectionsTool( vectorDistance: Number(r._distance || 0), partIndex: (r.partindex as number | undefined) ?? null, totalParts: (r.totalparts as number | undefined) ?? null, - content: String(r.text || ""), }), );