MCP ServerTools
Context Search
Natural language code search
Search your codebase with natural language. Results are grouped by process and ranked by relevance.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | Yes | Repository name |
q | string | Yes | Natural language query |
task_context | string | Yes | What you're working on |
current_goal | string | Yes | Your immediate objective |
search_intention | string | Yes | Why you're searching |
include_content | boolean | No | Include full symbol content (default: false) |
limit | number | No | Max processes (1-100, default: 10) |
max_symbols | number | No | Max symbols per process (1-100, default: 20) |
depth | string | No | Result detail level: "definitions" (default) or "full" |
Depth Parameter
Controls how much detail is returned for matched symbols:
| Value | Description |
|---|---|
"definitions" (default) | Symbol signatures and full body content only |
"full" | Symbols plus all relationships (calls, imports, edges) |
Use "full" when you need to understand how code connects across the codebase.
Example
Ask your agent:
"Find code related to user authentication"
Or provide context for better results:
"I'm adding OAuth support. Find the existing authentication code so I can understand how to integrate with it."
Response
Results are grouped by process:
{
"processes": [
{
"process_label": "UserAuthentication",
"relevance_score": 0.95,
"symbols": [
{
"symbol_name": "authenticateUser",
"file_path": "src/auth/authenticate.ts",
"line_number": 45
}
]
}
]
}Tips
- Be specific: "stripe webhook handler" beats "payment code"
- Provide context: Better task descriptions = better results
- Start broad, then narrow: Search "payments", then "refund processing"
- Use
include_content: trueonly when you need full function bodies
Related
- Cypher Query - Precise graph queries
- Code Exploration - Discovery workflows