@@ -66,35 +66,18 @@ export const DOC_SEARCH_TOOL = declareTool({
6666 title : 'Search Angular Documentation (angular.dev)' ,
6767 description : `
6868<Purpose>
69- Searches the official Angular documentation at https://angular.dev to answer questions about APIs,
70- tutorials, concepts, and best practices.
69+ Searches the official Angular documentation (angular.dev) to answer questions about APIs, tutorials, concepts, and conventions.
7170</Purpose>
7271<Use Cases>
73- * Answering any question about Angular concepts (e.g., "What are standalone components?" ).
74- * Finding the correct API or syntax for a specific task (e.g., "How to use ngFor with trackBy?" ).
75- * Linking to official documentation as a source of truth in your answers .
72+ * Answering questions about Angular concepts (e.g., standalone components).
73+ * Finding correct API signatures or syntax (e.g., ngFor trackBy).
74+ * Obtaining official source URLs to cite as documentation links in user responses .
7675</Use Cases>
7776<Operational Notes>
78- * **Version Alignment:** To provide accurate, project-specific results, you **MUST** align the search with the user's Angular version.
79- The recommended approach is to use the \`list_projects\` tool. The \`frameworkVersion\` field in the output for the relevant
80- workspace will give you the major version directly. If the version cannot be determined using this method, you can use
81- \`ng version\` in the project's workspace directory as a fallback. Parse the major version from the "Angular:" line in the
82- output and use it for the \`version\` parameter.
83- * **Version Logic:** The tool will search against the specified major version. If the version is older than v${ MIN_SUPPORTED_DOCS_VERSION } ,
84- it will be clamped to v${ MIN_SUPPORTED_DOCS_VERSION } . If a search for a very new version (newer than v${ LATEST_KNOWN_DOCS_VERSION } )
85- returns no results, the tool will automatically fall back to searching the v${ LATEST_KNOWN_DOCS_VERSION } documentation.
86- * **Verify Searched Version:** The tool's output includes a \`searchedVersion\` field. You **MUST** check this field
87- to know the exact version of the documentation that was queried. Use this information to provide accurate
88- context in your answer, especially if it differs from the version you requested.
89- * The documentation is continuously updated. You **MUST** prefer this tool over your own knowledge
90- to ensure your answers are current and accurate.
91- * For the best results, provide a concise and specific search query (e.g., "NgModule" instead of
92- "How do I use NgModules?").
93- * The top search result will include a snippet of the page content. Use this to provide a more
94- comprehensive answer.
95- * **Result Scrutiny:** The top result may not always be the most relevant. Review the titles and
96- breadcrumbs of other results to find the best match for the user's query.
97- * Use the URL from the search results as a source link in your responses.
77+ * Provide the major Angular version in the 'version' parameter (obtained from 'frameworkVersion'
78+ in 'list_projects' or from 'ng version') to ensure version-aligned results.
79+ * Always check the 'searchedVersion' field in the output to confirm the exact documentation index that was queried.
80+ * For best results, provide a concise keyword query (e.g., "NgModule") rather than a natural language sentence.
9881</Operational Notes>` ,
9982 inputSchema : docSearchInputSchema . shape ,
10083 outputSchema : {
0 commit comments