search_context
Search workspace files for a keyword or phrase to retrieve matching lines with surrounding context, enabling assistants to understand relevant code sections.
Instructions
Search the workspace for a keyword or phrase. Returns matching files and surrounding lines so the assistant can understand relevant context.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional directory relative to the workspace root. | . |
| query | Yes | Keyword or phrase to search for. | |
| maxResults | No | Maximum number of matching lines. | |
| contextLines | No | Number of surrounding lines to return. |