Loading...
Loading...
Reference for all GrepAI MCP tools. Use this skill to understand available MCP tools and their parameters.
npx skill4agent add yoanbernabeu/grepai-skills grepai-mcp-toolsgrepai mcp-serve| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Search query describing what to find |
| number | No | 10 | Maximum results to return |
| boolean | No | false | Return compact output (no content) |
| string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
{
"tool": "grepai_search",
"parameters": {
"query": "user authentication middleware",
"limit": 5,
"compact": true,
"format": "toon"
}
}{
"q": "user authentication middleware",
"r": [
{"s": 0.92, "f": "src/auth/middleware.go", "l": "15-45"},
{"s": 0.85, "f": "src/auth/jwt.go", "l": "23-55"},
{"s": 0.78, "f": "src/handlers/auth.go", "l": "10-40"}
],
"t": 3
}{
"query": "user authentication middleware",
"results": [
{
"score": 0.92,
"file": "src/auth/middleware.go",
"start_line": 15,
"end_line": 45,
"content": "func AuthMiddleware() gin.HandlerFunc {\n ..."
}
],
"total": 3
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Function/method name to trace |
| boolean | No | false | Return compact output (no context) |
| string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
{
"tool": "grepai_trace_callers",
"parameters": {
"symbol": "Login",
"compact": true
}
}{
"q": "Login",
"m": "callers",
"c": 3,
"r": [
{"f": "handlers/auth.go", "l": 42, "fn": "HandleAuth"},
{"f": "handlers/auth_test.go", "l": 15, "fn": "TestLoginSuccess"},
{"f": "cmd/main.go", "l": 88, "fn": "RunCLI"}
]
}{
"query": "Login",
"mode": "callers",
"count": 3,
"results": [
{
"file": "handlers/auth.go",
"line": 42,
"caller": "HandleAuth",
"context": "user.Login(ctx, credentials)"
}
]
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Function/method name to trace |
| boolean | No | false | Return compact output (no context) |
| string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
{
"tool": "grepai_trace_callees",
"parameters": {
"symbol": "ProcessOrder",
"compact": true
}
}{
"q": "ProcessOrder",
"m": "callees",
"c": 4,
"r": [
{"f": "services/order.go", "l": 45, "fn": "validateOrder"},
{"f": "services/order.go", "l": 48, "fn": "calculateTotal"},
{"f": "services/order.go", "l": 51, "fn": "applyDiscount"},
{"f": "services/order.go", "l": 55, "fn": "sendConfirmation"}
]
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Root function for the graph |
| number | No | 2 | Maximum recursion depth |
| boolean | No | false | Return compact JSON format |
| string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
{
"tool": "grepai_trace_graph",
"parameters": {
"symbol": "main",
"depth": 3,
"compact": true
}
}{
"q": "main",
"d": 3,
"r": {
"n": "main",
"c": [
{
"n": "initialize",
"c": [
{"n": "loadConfig"},
{"n": "connectDB"}
]
},
{
"n": "startServer",
"c": [
{"n": "registerRoutes"}
]
}
]
},
"s": {"nodes": 6, "depth": 3}
}{
"query": "main",
"mode": "graph",
"depth": 3,
"root": {
"name": "main",
"file": "cmd/main.go",
"line": 10,
"children": [
{
"name": "initialize",
"file": "cmd/main.go",
"line": 15,
"children": [...]
}
]
},
"stats": {
"nodes": 6,
"max_depth": 3
}
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| boolean | No | false | Include detailed information |
| string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
{
"tool": "grepai_index_status",
"parameters": {
"verbose": true
}
}{
"status": "healthy",
"project": "/path/to/project",
"embedder": {
"provider": "ollama",
"model": "nomic-embed-text",
"status": "connected"
},
"store": {
"backend": "gob",
"location": ".grepai/index.gob"
},
"index": {
"files": 245,
"chunks": 1234,
"last_updated": "2025-01-28T10:30:00Z"
},
"daemon": {
"running": true,
"pid": 12345
}
}compact: true| Full Key | Compact Key | Description |
|---|---|---|
| | Search query or symbol |
| | Results array |
| | Total count |
| | Count |
| | Similarity score |
| | File path |
| | Line number(s) |
| | Trace mode |
| | Graph depth |
| | Node name |
| | Child nodes |
| | Statistics |
| | Function name |
| Response Type | Full | Compact | Savings |
|---|---|---|---|
| Search (5 results) | ~800 | ~150 | 81% |
| Trace callers (10) | ~600 | ~120 | 80% |
| Trace graph (depth 3) | ~1200 | ~250 | 79% |
{
"error": "Index not found. Run 'grepai watch' first.",
"code": "INDEX_NOT_FOUND"
}{
"error": "Cannot connect to embedding provider. Is Ollama running?",
"code": "EMBEDDER_UNAVAILABLE"
}{
"error": "Symbol 'FunctionName' not found in index.",
"code": "SYMBOL_NOT_FOUND"
}{
"error": "Parameter 'query' is required.",
"code": "INVALID_PARAMETERS"
}grepai_index_status{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "grepai_search",
"arguments": {
"query": "authentication",
"limit": 5,
"compact": true
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\"q\":\"authentication\",\"r\":[...],\"t\":5}"
}
]
}
}📚 GrepAI MCP Tools Reference
Tools available:
1. grepai_search
- Semantic code search
- Params: query*, limit, compact
2. grepai_trace_callers
- Find function callers
- Params: symbol*, compact
3. grepai_trace_callees
- Find function callees
- Params: symbol*, compact
4. grepai_trace_graph
- Build call graph
- Params: symbol*, depth, compact
5. grepai_index_status
- Check index health
- Params: verbose
* = required parameter
Compact mode: ~80% token reduction