grepai-mcp-tools by yoanbernabeu/grepai-skills
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-tools此技能提供了通过 GrepAI 的 MCP 服务器可用的所有工具的完整参考。
grepai mcp-serve
服务器通过模型上下文协议暴露工具。
使用嵌入进行语义代码搜索。
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
query | string | 是 | - | 描述要查找内容的搜索查询 |
limit |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| number |
| 否 |
| 10 |
| 返回的最大结果数 |
compact | boolean | 否 | false | 返回紧凑输出(无内容) |
format | string | 否 | "json" | 输出格式:"json" 或 "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
}
查找调用指定符号的所有函数。
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
symbol | string | 是 | - | 要追踪的函数/方法名称 |
compact | boolean | 否 | false | 返回紧凑输出(无上下文) |
format | string | 否 | "json" | 输出格式:"json" 或 "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)"
}
]
}
查找指定符号调用的所有函数。
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
symbol | string | 是 | - | 要追踪的函数/方法名称 |
compact | boolean | 否 | false | 返回紧凑输出(无上下文) |
format | string | 否 | "json" | 输出格式:"json" 或 "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"}
]
}
从符号开始构建完整的调用图。
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
symbol | string | 是 | - | 图的根函数 |
depth | number | 否 | 2 | 最大递归深度 |
compact | boolean | 否 | false | 返回紧凑 JSON 格式 |
format | string | 否 | "json" | 输出格式:"json" 或 "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
}
}
检查代码索引的健康状态和状态。
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
verbose | boolean | 否 | false | 包含详细信息 |
format | string | 否 | "json" | 输出格式:"json" 或 "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 时,响应使用缩写键:
| 完整键 | 紧凑键 | 描述 |
|---|---|---|
query | q | 搜索查询或符号 |
results | r | 结果数组 |
total | t | 总数 |
count | c | 计数 |
score | s | 相似度分数 |
file | f | 文件路径 |
line | l | 行号 |
mode | m | 追踪模式 |
depth | d | 图深度 |
name | n | 节点名称 |
children | c | 子节点 |
stats | s | 统计信息 |
function | fn | 函数名称 |
紧凑模式显著减少令牌使用:
| 响应类型 | 完整模式 | 紧凑模式 | 节省 |
|---|---|---|---|
| 搜索(5个结果) | ~800 | ~150 | 81% |
| 追踪调用者(10个) | ~600 | ~120 | 80% |
| 追踪图(深度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}"
}
]
}
}
MCP 工具参考摘要:
📚 GrepAI MCP 工具参考
可用工具:
1. grepai_search
- 语义代码搜索
- 参数:query*, limit, compact
2. grepai_trace_callers
- 查找函数调用者
- 参数:symbol*, compact
3. grepai_trace_callees
- 查找函数被调用者
- 参数:symbol*, compact
4. grepai_trace_graph
- 构建调用图
- 参数:symbol*, depth, compact
5. grepai_index_status
- 检查索引健康状态
- 参数:verbose
* = 必需参数
紧凑模式:约 80% 令牌减少
每周安装数
263
仓库
GitHub 星标数
15
首次出现
2026年1月28日
安全审计
安装于
opencode217
codex211
gemini-cli194
github-copilot194
kimi-cli180
amp178
This skill provides a complete reference for all tools available through GrepAI's MCP server.
grepai mcp-serve
The server exposes tools via the Model Context Protocol.
Semantic code search using embeddings.
| 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+) |
{
"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
}
Find all functions that call a specified symbol.
| 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+) |
{
"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)"
}
]
}
Find all functions called by a specified symbol.
| 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+) |
{
"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"}
]
}
Build a complete call graph starting from a symbol.
| 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 |
{
"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
}
}
Check the health and status of the code index.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
verbose | boolean | No | false | Include detailed information |
format | 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
}
}
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 |
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": "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 before searches{
"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}"
}
]
}
}
MCP tools reference summary:
📚 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
Weekly Installs
263
Repository
GitHub Stars
15
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode217
codex211
gemini-cli194
github-copilot194
kimi-cli180
amp178
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装
Docassemble 表单构建器技能 - 创建智能动态问卷与文档生成工具
257 周安装
Fastify TypeScript 生产级后端框架指南:高性能 Node.js Web 开发与 JSON 模式验证
257 周安装
AI 演示文稿生成器 | 一键创建专业幻灯片,支持 Marp 格式输出
257 周安装
Mapbox搜索模式指南:地理编码、POI搜索与位置发现最佳实践
257 周安装
Zustand适配器:为json-render提供状态管理后端,支持嵌套切片与Zustand v5+
257 周安装
Blender MCP 插件使用指南:3D 场景自动化与 Python 脚本控制教程
257 周安装
| string |
| No |
| "json" |
| Output format: "json" or "toon" (v0.26.0+) |
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 |