add_code_chunk
Index code chunks for semantic search by automatically splitting content with tree-sitter and storing them in a codebase directory.
Instructions
Index a code chunk for semantic search.
Automatically chunks the content using tree-sitter.
Args:
filepath: Path to the code file
content: Code content to index
directory: Path to the codebase directory (index will be stored here)
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": {
"filepath": "<filepath>",
"content": "<content>",
"directory": "<directory>"
},
"name": "add_code_chunk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| filepath | Yes | ||
| directory | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |