You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The packages/mcp package is deprecated and should not be modified.
Reverted the conditional ask_codebase registration changes from this package.
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Searches for code that matches the provided search query as a substring by default, or as a regular expression if useRegex is true. Useful for exploring remote repositories by searching for exact symbols, functions, variables, or specific code patterns. To determine if a repository is indexed, use the \`list_repos\` tool. By default, searches are global and will search the default branch of all repositories. Searches can be scoped to specific repositories, languages, and branches. When referencing code outputted by this tool, always include the file's external URL as a link. This makes it easier for the user to view the file, even if they don't have it locally checked out.
@@ -407,58 +413,46 @@ server.tool(
407
413
}
408
414
);
409
415
410
-
if(hasLanguageModels){
411
-
server.tool(
412
-
"ask_codebase",
413
-
dedent`
414
-
Ask a natural language question about the codebase. This tool uses an AI agent to autonomously search code, read files, and find symbol references/definitions to answer your question.
416
+
server.tool(
417
+
"ask_codebase",
418
+
dedent`
419
+
Ask a natural language question about the codebase. This tool uses an AI agent to autonomously search code, read files, and find symbol references/definitions to answer your question.
415
420
416
-
The agent will:
417
-
- Analyze your question and determine what context it needs
418
-
- Search the codebase using multiple strategies (code search, symbol lookup, file reading)
419
-
- Synthesize findings into a comprehensive answer with code references
421
+
The agent will:
422
+
- Analyze your question and determine what context it needs
423
+
- Search the codebase using multiple strategies (code search, symbol lookup, file reading)
424
+
- Synthesize findings into a comprehensive answer with code references
420
425
421
-
Returns a detailed answer in markdown format with code references, plus a link to view the full research session (including all tool calls and reasoning) in the Sourcebot web UI.
426
+
Returns a detailed answer in markdown format with code references, plus a link to view the full research session (including all tool calls and reasoning) in the Sourcebot web UI.
422
427
423
-
When using this in shared environments (e.g., Slack), you can set the visibility parameter to 'PUBLIC' to ensure everyone can access the chat link.
428
+
When using this in shared environments (e.g., Slack), you can set the visibility parameter to 'PUBLIC' to ensure everyone can access the chat link.
424
429
425
-
This is a blocking operation that may take 30-60+ seconds for complex questions as the agent researches the codebase.
426
-
`,
427
-
askCodebaseRequestSchema.shape,
428
-
{readOnlyHint: true},
429
-
async(request: AskCodebaseRequest)=>{
430
-
constresponse=awaitaskCodebase(request);
430
+
This is a blocking operation that may take 30-60+ seconds for complex questions as the agent researches the codebase.
431
+
`,
432
+
askCodebaseRequestSchema.shape,
433
+
{readOnlyHint: true},
434
+
async(request: AskCodebaseRequest)=>{
435
+
constresponse=awaitaskCodebase(request);
431
436
432
-
// Format the response with the answer and a link to the chat
433
-
constformattedResponse=dedent`
434
-
${response.answer}
437
+
// Format the response with the answer and a link to the chat
438
+
constformattedResponse=dedent`
439
+
${response.answer}
435
440
436
-
---
437
-
**View full research session:** ${response.chatUrl}
438
-
**Model used:** ${response.languageModel.model}
439
-
`;
441
+
---
442
+
**View full research session:** ${response.chatUrl}
0 commit comments