grepai-mcp-tools
Reference for all GrepAI MCP tools. Use this skill to understand available MCP tools and their parameters.
What this skill does
# GrepAI MCP Tools Reference
This skill provides a complete reference for all tools available through GrepAI's MCP server.
## When to Use This Skill
- Understanding available MCP tools
- Learning tool parameters and options
- Integrating GrepAI with AI assistants
- Debugging MCP tool usage
## Starting the MCP Server
```bash
grepai mcp-serve
```
The server exposes tools via the Model Context Protocol.
## Available Tools
### 1. grepai_search
Semantic code search using embeddings.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `query` | string | Yes | - | Search query describing what to find |
| `limit` | number | No | 10 | Maximum results to return |
| `compact` | boolean | No | false | Return compact output (no content) |
| `format` | string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
#### Example Request
```json
{
"tool": "grepai_search",
"parameters": {
"query": "user authentication middleware",
"limit": 5,
"compact": true,
"format": "toon"
}
}
```
#### Response (Compact)
```json
{
"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
}
```
#### Response (Full)
```json
{
"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
}
```
---
### 2. grepai_trace_callers
Find all functions that call a specified symbol.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `symbol` | string | Yes | - | Function/method name to trace |
| `compact` | boolean | No | false | Return compact output (no context) |
| `format` | string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
#### Example Request
```json
{
"tool": "grepai_trace_callers",
"parameters": {
"symbol": "Login",
"compact": true
}
}
```
#### Response (Compact)
```json
{
"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"}
]
}
```
#### Response (Full)
```json
{
"query": "Login",
"mode": "callers",
"count": 3,
"results": [
{
"file": "handlers/auth.go",
"line": 42,
"caller": "HandleAuth",
"context": "user.Login(ctx, credentials)"
}
]
}
```
---
### 3. grepai_trace_callees
Find all functions called by a specified symbol.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `symbol` | string | Yes | - | Function/method name to trace |
| `compact` | boolean | No | false | Return compact output (no context) |
| `format` | string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
#### Example Request
```json
{
"tool": "grepai_trace_callees",
"parameters": {
"symbol": "ProcessOrder",
"compact": true
}
}
```
#### Response (Compact)
```json
{
"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"}
]
}
```
---
### 4. grepai_trace_graph
Build a complete call graph starting from a symbol.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `symbol` | string | Yes | - | Root function for the graph |
| `depth` | number | No | 2 | Maximum recursion depth |
| `compact` | boolean | No | false | Return compact JSON format |
| `format` | string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
#### Example Request
```json
{
"tool": "grepai_trace_graph",
"parameters": {
"symbol": "main",
"depth": 3,
"compact": true
}
}
```
#### Response (Compact)
```json
{
"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}
}
```
#### Response (Full)
```json
{
"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
}
}
```
---
### 5. grepai_index_status
Check the health and status of the code index.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `verbose` | boolean | No | false | Include detailed information |
| `format` | string | No | "json" | Output format: "json" or "toon" (v0.26.0+) |
#### Example Request
```json
{
"tool": "grepai_index_status",
"parameters": {
"verbose": true
}
}
```
#### Response
```json
{
"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 Format Reference
When `compact: true`, responses use abbreviated keys:
| Full Key | Compact Key | Description |
|----------|-------------|-------------|
| `query` | `q` | Search query or symbol |
| `results` | `r` | Results array |
| `total` | `t` | Total count |
| `count` | `c` | Count |
| `score` | `s` | Similarity score |
| `file` | `f` | File path |
| `line` | `l` | Line number(s) |
| `mode` | `m` | Trace mode |
| `depth` | `d` | Graph depth |
| `name` | `n` | Node name |
| `children` | `c` | Child nodes |
| `stats` | `s` | Statistics |
| `function` | `fn` | Function name |
## Token Efficiency
Compact mode reduces tokens significantly:
| 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 Responses
### Index Not Found
```json
{
"error": "Index not found. Run 'grepai watch' first.",
"code": "INDEX_NOT_FOUND"
}
```
### Embedder Connection Failed
```json
{
"error": "Cannot connect to embedding provider. Is Ollama running?",
"code": "EMBEDDER_UNAVAILABLE"
}
```
### Symbol Not Found
```json
{
"error": "Symbol 'FunctionName' not found in index.",
"code": "SYMBOL_NOT_FOUND"
}
```
### Invalid Parameters
```json
{
"error": "Parameter 'query' is required.",
"code": "INVALID_PARAMETERS"
}
```
## Best Practices for AI Integration
1. **Use compact mode:** Reduces token usage by ~80%
2. **Limit results:** Request only what you need
3. **Check status first:** Use `grepai_index_status` before searches
4. **Handle errors:** Check for error responses
5. **Combine tools:** Search + trace for full understanding
## MCP Protocol Details
### Request Format
```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "grepai_search",
"arguments": {
"query": "authentication",
"limit": 5,
"compact": Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.