diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index bf99f5e..9a5eba7 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -164,7 +164,7 @@ export class KnowledgeError extends Error { /** * Default instruction template */ -export const DEFAULT_TEMPLATE = `Use available text search tools to search for {{keywords}} in {{local_path}}. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.`; +export const DEFAULT_TEMPLATE = `Use available text search tools to search for {{keywords}} in {{local_path}} and its sub folders. Try broader terms if needed. Skip: node_modules/, .git/, build/, dist/.`; /** * Allowed template variables that can be used in instruction templates diff --git a/packages/mcp-server/src/__tests__/integration.test.ts b/packages/mcp-server/src/__tests__/integration.test.ts index fc92213..5f8fb2d 100644 --- a/packages/mcp-server/src/__tests__/integration.test.ts +++ b/packages/mcp-server/src/__tests__/integration.test.ts @@ -197,7 +197,9 @@ docsets: // Should return an error expect(result.isError).toBe(true); expect(result.content[0].text).toContain("not initialized"); - expect(result.content[0].text).toContain("agentic-knowledge init"); + expect(result.content[0].text).toContain( + "npx agentic-knowledge-mcp init", + ); }); }); }); diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 4f64592..302438a 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -178,15 +178,7 @@ After configuring, the tool will show available docsets here.`, 📚 **AVAILABLE DOCSETS:** ${docsetInfo} - -🔍 **STRUCTURED RESPONSE:** -Returns JSON object with: -- instructions: Search guidance text -- search_terms: Primary keywords to search for -- generalized_search_terms: Broader terms for context -- path: Local directory path to search in - -Use the path and search terms with your available text search tools.`; +`; return { tools: [ @@ -273,10 +265,7 @@ Use the path and search terms with your available text search tools.`; const availableIds = config.docsets.map((d) => d.id).join(", "); throw new Error( `Docset '${docset_id}' not found.\n\n` + - `Available docsets: ${availableIds}\n\n` + - `To create a new docset:\n` + - `agentic-knowledge create --preset git-repo --id ${docset_id} --name "My Docs" --url \n` + - `agentic-knowledge init ${docset_id}`, + `Available docsets: ${availableIds}\n\n`, ); } @@ -298,9 +287,7 @@ Use the path and search terms with your available text search tools.`; `Docset '${docset_id}' is not initialized.\n\n` + `The docset is configured but hasn't been initialized yet.\n\n` + `To initialize this docset:\n` + - `agentic-knowledge init ${docset_id}\n\n` + - `To check status of all docsets:\n` + - `agentic-knowledge status`, + `npx agentic-knowledge-mcp init ${docset_id}\n\n`, ); } @@ -329,9 +316,7 @@ Use the path and search terms with your available text search tools.`; `Docset '${docset_id}' is not initialized.\n\n` + `The docset is configured but hasn't been initialized yet.\n\n` + `To initialize this docset:\n` + - `agentic-knowledge init ${docset_id}\n\n` + - `To check status of all docsets:\n` + - `agentic-knowledge status`, + `npx agentic-knowledge-mcp init ${docset_id}\n\n`, ); } } else {