Skip to main content
Glama

agentmako

npm version Smoke Tests License: Apache 2.0 Node.js >=20 agentmako MCP server

agentmako 是一个面向 AI 编码工具的本地优先代码库智能引擎。

它为 Codex、Claude Code、Cursor 和本地工具链等代理提供了一个类型化的 MCP 工具集,以便在编辑代码之前理解项目。Mako 会索引你的仓库,构建基于 SQLite 的本地事实,跟踪诊断和审查记录,并返回结构化的上下文数据包,而不是让代理通过原始 grep 命令重新发现一切。

Mako 专为编码代理工作的“第一公里”而设计:

哪些文件重要?哪些路由、符号、表、诊断和先前的发现是相关的?代理接下来应该阅读什么?

你将获得什么

  • 编码代理的 MCP 服务器:agentmako mcp

  • 本地仪表盘:agentmako dashboard

  • 确定性的上下文数据包:context_packet, reef_scout

  • 代码搜索和结构工具:cross_search, live_text_search, ast_find_pattern, repo_map

  • Reef Engine 事实和发现,涵盖已索引、工作树和暂存状态

  • TypeScript、ESLint、Oxlint、Biome 和暂存 git 诊断摄取

  • 可选的 Postgres/Supabase 模式快照和只读数据库检查

  • 用于记录表、RLS、触发器、发布、订阅和复制的本地数据库审查注释

  • 用于重复审查工作的召回、确认和代理反馈

所有重要内容都在本地运行。无需托管服务。

Related MCP server: Atlas

安装

需要 Node.js 20 或更高版本。

npm install -g agentmako

确认 CLI 可用:

agentmako doctor

你应该会看到配置和本地 API 服务的绿色勾选。

倾向于从源码构建(例如为了贡献代码)?请参阅本文档底部的 从源码开发。

快乐路径设置

1. 关联你的真实项目

进入你希望 Mako 理解的项目:

cd C:/path/to/your/project

关联并索引它:

agentmako connect . --no-db

首次运行时使用 --no-db。它会在添加数据库范围之前先让代码智能路径正常工作。

2. 确认 Mako 能看到项目

agentmako status .
agentmako tool list

运行一次真实的侦察查询:

agentmako --json tool call . reef_scout "{\"query\":\"where should I inspect auth route state?\"}"

如果返回了排名候选、事实或发现,则核心设置已正常工作。

3. 配置你的 MCP 客户端

将此内容添加到你的 MCP 客户端配置中:

{
  "mcpServers": {
    "mako-ai": {
      "command": "agentmako",
      "args": ["mcp"]
    }
  }
}

重启 MCP 客户端并确认 mako-ai 服务器已启动。

在代理中,从以下工具之一开始:

  • tool_search:当你需要查找合适的 Mako 工具时

  • context_packet:当你有一个编码任务并想要初始上下文时

  • reef_scout:当你想要排名后的项目事实/发现/历史记录时

  • ask:当你有一个关于仓库的自然语言问题时

4. 可选:使用 Claude Code 插件

普通的 MCP 可以与 Claude Code 一起使用,但捆绑的插件添加了 Mako 特有的 Claude 技能,并在 mako-ai-claude-plugin/.mcp.json 中包含了相同的 agentmako mcp 配置。

先决条件:

  • 已安装 Claude Code

  • PATH 中有 Node.js 20+

  • 你的目标项目已通过 agentmako connect 关联

从 agentmako 仓库根目录:

claude plugin validate .\mako-ai-claude-plugin
claude --plugin-dir .\mako-ai-claude-plugin

在 Claude Code 中,运行 /mcp 并确认 mako-ai 已连接。

该插件公开了以下技能:

  • /mako-ai:mako-guide

  • /mako-ai:mako-discovery

  • /mako-ai:mako-trace

  • /mako-ai:mako-neighborhoods

  • /mako-ai:mako-graph

  • /mako-ai:mako-database

  • /mako-ai:mako-code-intel

  • /mako-ai:mako-workflow

当你希望 Claude Code 加载 Mako 特有的指导(关于调用哪些工具以及如何解释结果)时,请使用该插件。

5. 可选:启动仪表盘

从你的目标项目:

agentmako dashboard .

这将启动本地 API、工具链服务和 Web 仪表盘。

6. 可选:添加 Supabase/Postgres 感知

Mako 在没有数据库的情况下也能工作。仅在代码智能正常工作后添加此功能。

进行一次性交互式设置:

agentmako connect .

对于 CI 或使用环境变量的脚本化设置:

set DATABASE_URL=postgres://...
agentmako connect . --db-env DATABASE_URL --yes

然后刷新并验证本地模式快照:

agentmako refresh .
agentmako verify .

交互模式默认将数据库密钥存储在你的操作系统钥匙串中。项目配置存储的是引用,而不是明文数据库 URL。

日常工作循环

从目标项目:

agentmako status .
agentmako dashboard .
agentmako --json tool call . context_packet "{\"query\":\"fix the broken auth callback route\"}"

用于暂存审查检查:

agentmako git precommit . --json

用于数据库审查注释:

agentmako --json tool call . db_review_comment "{\"objectType\":\"replication\",\"objectName\":\"supabase_database_replication\",\"category\":\"review\",\"comment\":\"Check publication coverage before relying on realtime events.\",\"tags\":[\"supabase\",\"replication\"]}"

从源码开发

如果你想修改 Mako 本身,请克隆并构建,而不是从 npm 安装。

先决条件:

  • Node.js 20 或更高版本

  • Git

  • Corepack (corepack enable,现代 Node.js 已包含)

git clone https://github.com/drhalto/agentmako.git
cd agentmako
corepack pnpm install
corepack pnpm run build
npm link ./apps/cli

npm link ./apps/cli 使源码构建的 CLI 在你的 PATH 中作为 agentmako 可用,替换任何全局 npm 安装。拉取更改后重新运行 corepack pnpm run build。

要回到已发布版本:npm install -g agentmako。

开发检查

corepack pnpm run typecheck
corepack pnpm run build
corepack pnpm run test:smoke:reef-tooling
corepack pnpm run test:smoke:reef-model-facing-views

全面验证:

corepack pnpm test

仓库布局

apps/
  cli/              agentmako CLI and MCP entrypoint (the published package)
  web/              local dashboard
packages/
  contracts/        public TypeScript contracts and tool schemas
  config/           shared config helpers
  logger/           shared logger
  sdk/              programmatic SDK
  store/            SQLite stores, migrations, and query helpers
  tools/            shared tool implementations
  harness-core/     local agent harness runtime
  harness-tools/    action tools available to the harness
  harness-contracts/ harness contracts and provider catalog
services/
  api/              local API and MCP transports
  engine/           Reef Engine fact/finding pipeline
  harness/          local harness HTTP service
  indexer/          repo and schema indexing logic
  worker/           background worker
extensions/         provider and integration packages
storage/            schema migrations, models, queries
test/smoke/         smoke coverage
mako-ai-claude-plugin/ Claude Code plugin with Mako skills

更多文档

许可证

Apache-2.0。请参阅 LICENSE。

Available Tools

105 tools
agent_feedbackagent_feedbackA

Append-only feedback tool for rating a prior Mako tool run from the agent perspective. Use sparingly when a result was notably good, notably bad, or wrong; do not emit routine feedback after every call. Requires referencedToolName and referencedRequestId so each row is tied to a specific prior run. Grade semantics: full = helped complete the task, partial = somewhat useful but flawed, no = wrong or wasted the turn. Starter reason codes: full: answer_complete, evidence_sufficient, trust_matches; partial: partial_coverage, noisy, stale_evidence, missing_known_caller, top_not_useful; no: answer_wrong, wasted_turn, tool_did_nothing, schema_missing.

Inputs: grade (required), reasonCodes (required), referencedToolName (required), referencedRequestId (required), +3 more. Returns: _hints, eventId, toolName, projectId, +1 more

agent_feedback_reportagent_feedback_reportA
Read-onlyIdempotent

Read-only inspection over agent_feedback rows in mako_usefulness_events: return grade counts by referenced tool plus bounded recent entries, filterable by referencedToolName, grade, and ISO time window. Use to review which tools agents found helpful, noisy, wrong, or incomplete.

Inputs: grade, limit, since, until, +3 more. Returns: _hints, byTool, entries, toolName, +4 more

apply_patchA
Destructive

Apply a multi-file unified diff. Hunks must apply cleanly with exact context.

Inputs: diff (required). Returns: ok, error, _hints, requiresHarnessSession

askaskA
Read-only

Router tool: map one natural-language engineering question to one canonical named tool, or conservatively fall back to free_form.

Inputs: question (required), projectId, projectRef. Returns: mode, _hints, result, toolName, +5 more

ast_find_patternast_find_patternA
Read-onlyIdempotent

Code-intelligence tool for structural pattern search: run one ast-grep pattern against every fresh indexed TypeScript / TSX / JavaScript / JSX file and return typed matches (file, line range, column range, matched text, captured metavariables). Ambiguous TSX/JSX snippets that start with {, [, or < retry with an auto-anchored const _ = ... parser context when the original pattern returns zero matches, and patternAttempts / match patternVariant report which form matched. Reef-backed freshness guard skips stale/deleted/unknown indexed files so old AST rows do not become phantom matches; set MAKO_REEF_BACKED=legacy for the one-release rollback path. Read-only; never edits files. Use when text/FTS search is too noisy for structural queries (e.g. console.log($X), await supabase.rpc($NAME), useEffect($FN, [])).

Inputs: pattern (required), captures, maxFiles, pathGlob, +5 more. Returns: _hints, matches, pattern, toolName, +9 more

auth_pathauth_pathA
Read-onlyIdempotent

Answer tool for auth questions: trace likely auth boundaries for a route, file, or feature without overclaiming. When no exact route/file/feature match exists, returns matched:false with suggestedNext:{ tool:"cross_search", args:{...} } instead of throwing, so batches and agent workflows can continue.

Inputs: file, route, feature, projectId, +1 more. Returns: _hints, reason, result, matched, +4 more

biome_diagnosticsbiome_diagnosticsA

Explicit Reef ingestion tool for Biome diagnostics: run the project's local Biome executable or GitLab-reporter package script on requested project-relative files with check --reporter=gitlab, persist working-tree ProjectFinding rows under source biome, and record unavailable/error/succeeded run status. File-mode only; deliberately avoids Biome's experimental JSON reporter.

Inputs: files (required), projectId, projectRef, scriptName, +1 more. Returns: _hints, status, command, exitCode, +12 more

change_planchange_planC
Read-onlyIdempotent

Graph tool for bounded change scope: return path-derived direct surfaces, one-hop dependent surfaces, and an explicit dependency order.

Inputs: startEntity (required), targetEntity (required), direction, edgeKinds, +4 more. Returns: _hints, result, toolName, projectId

context_packetcontext_packetA
Read-onlyIdempotent

Context scout for coding agents: turn a messy request into ranked, source-labeled, readable context using deterministic providers first (bounded live quoted-literal search, files, routes, symbols, schema, import graph, centrality, hot hints). Retrieval diagnostics expose providerExecutionMode, totalProviderDurationMs, slowestProvider, evidence gates, and executable follow-ups so agents can distinguish recall gaps from slow or incomplete provider lanes. Reef-backed enrichments add working-tree overlay metadata and active findings; use risksMinConfidence to suppress low-confidence risk speculation. Set MAKO_REEF_BACKED=legacy for the one-release rollback path. Read-only; does not refresh the index. Use as the first-mile packet before normal harness read/search/edit loops.

Inputs: request (required), mode, projectId, focusFiles, +13 more. Returns: mode, risks, _hints, intent, +23 more

create_fileA
Destructive

Create a new file at a project-relative path. Errors if the file already exists; use file_write to overwrite.

Inputs: path (required), content (required). Returns: ok, error, _hints, requiresHarnessSession

db_columnsdb_columnsB
Read-onlyIdempotent

Read-only database tool for column questions: inspect only columns and primary-key details for a table via pg_catalog.

Inputs: table (required), schema, projectId, projectRef. Returns: table, _hints, schema, columns, +1 more

db_fkdb_fkA
Read-onlyIdempotent

Read-only database tool for relationship questions: inspect inbound and outbound foreign-key references for a table via pg_catalog.

Inputs: table (required), schema, projectId, projectRef. Returns: table, _hints, schema, inbound, +2 more

db_pingdb_pingA
Read-onlyIdempotent

Read-only database tool: verify connectivity and surface platform, version, schemas, and transaction state.

Inputs: projectId, projectRef. Returns: _hints, schemas, database, platform, +5 more

db_reef_refreshdb_reef_refreshA

Explicit Reef DB ingestion tool: replace indexed Reef facts for the current schema snapshot, including schemas, tables, columns, indexes, foreign keys, RLS policies, triggers, enums, RPCs, scheduled jobs, RPC-to-table refs, and indexed schema usages. Uses the existing schema snapshot/read-model indexes; run project_index_refresh first if the snapshot is stale or missing.

Inputs: freshen, projectId, factsLimit, projectRef, +2 more. Returns: facts, _hints, summary, toolName, +5 more

db_review_commentdb_review_commentA

Append-only DB review note tool: leave a short AI/operator comment on a database object such as a table, column, policy, trigger, publication, replication slot, or general replication topic. Writes only to Mako's local project store; it never mutates the live database.

Inputs: comment (required), objectName (required), objectType (required), tags, +9 more. Returns: _hints, comment, preview, toolName, +4 more

db_review_commentsdb_review_commentsA
Read-onlyIdempotent

Read DB review comments from Mako's local append-only ledger, filterable by database object, category, tag, free-text query, or target fingerprint. Use during schema/table/RLS/replication review to recover prior AI/operator notes.

Inputs: tag, limit, query, category, +7 more. Returns: _hints, filters, comments, toolName, +4 more

db_rlsdb_rlsA
Read-onlyIdempotent

Read-only database tool for security questions: inspect row-level security state and policies for a table via pg_catalog.

Inputs: table (required), schema, projectId, projectRef. Returns: table, _hints, schema, forceRls, +3 more

db_rpcdb_rpcA
Read-onlyIdempotent

Read-only database tool for function questions: inspect one stored procedure/function signature by name, or pass list: true to enumerate routines with signatures, return shape, language, and security.

Inputs: list, name, limit, schema, +5 more. Returns: args, mode, name, rpcs, +11 more

db_table_schemadb_table_schemaA
Read-onlyIdempotent

Read-only database tool for full table shape: inspect columns, indexes, constraints, foreign keys, RLS, and triggers.

Inputs: table (required), schema, projectId, projectRef. Returns: rls, table, _hints, schema, +6 more

delete_fileA
Destructive

Delete a file at a project-relative path. Snapshot captures the bytes for undo.

Inputs: path (required). Returns: ok, error, _hints, requiresHarnessSession

diagnostic_refreshdiagnostic_refreshA

Explicit Reef diagnostic ingestion runner: invoke selected diagnostic sources (lint_files, programmatic_findings, typescript_syntax, TypeScript, ESLint, Oxlint, Biome, or git_precommit_check), persist their Reef diagnostic runs/findings through the underlying tools, and return a compact per-source summary. File-mode sources are skipped unless files are supplied; this is a mutation tool because it refreshes Reef state.

Inputs: files, scripts, sources, projectId, +5 more. Returns: _hints, results, summary, findings, +4 more

eslint_diagnosticseslint_diagnosticsA

Explicit Reef ingestion tool for ESLint diagnostics: run the project's local ESLint executable on the requested project-relative files with JSON output, persist working-tree ProjectFinding rows under source eslint, and record unavailable/error/succeeded run status. File-mode only; does not run broad project lint.

Inputs: files (required), projectId, projectRef, scriptName, +1 more. Returns: _hints, status, command, exitCode, +12 more

evidence_confidenceevidence_confidenceC
Read-onlyIdempotent

Reef 10 evidence-confidence view: label facts and findings as verified_live, fresh_indexed, stale_indexed, fuzzy_semantic, historical, contradicted, or unknown so model-facing tools can prefer trustworthy evidence.

Inputs: limit, filePath, projectId, projectRef, +1 more. Returns: items, _hints, summary, toolName, +4 more

evidence_conflictsevidence_conflictsA
Read-onlyIdempotent

Reef 10 conflict view: surface stale indexed evidence, explicit conflict facts, and findings that report incorrect or contradictory evidence, with suggested cross-check actions.

Inputs: limit, filePath, projectId, projectRef, +2 more. Returns: _hints, toolName, warnings, conflicts, +4 more

exports_ofexports_ofB
Read-onlyIdempotent

Symbols tool for exports: list only the indexed symbols that a file exports.

Inputs: file (required), projectId, projectRef. Returns: file, _hints, exports, toolName, +4 more

extract_rule_templateextract_rule_templateA
Read-onlyIdempotent

Read-only Reef rule-pack mining tool: inspect a local git fix diff and propose .mako/rules YAML templates from removed TS/JS anti-pattern shapes, with related durable findings when available. Does not write files or mutate Reef state.

Inputs: fixCommit (required), filePath, projectId, baseCommit, +4 more. Returns: _hints, summary, toolName, warnings, +8 more

file_editA
Destructive

Replace a substring in an existing file. The substring must occur exactly once unless replaceAll is true.

Inputs: path (required), newString (required), oldString (required), replaceAll. Returns: ok, error, _hints, requiresHarnessSession

file_factsfile_factsA
Read-onlyIdempotent

Reef read tool for one file's durable facts: computes the file subject fingerprint and returns facts such as working_tree_overlay file_snapshot rows. Use this to inspect what Reef currently knows about a file across overlays.

Inputs: filePath (required), kind, limit, source, +4 more. Returns: facts, _hints, filters, filePath, +6 more

file_findingsfile_findingsA
Read-onlyIdempotent

Reef read tool for one project-relative file: return durable Reef findings attached to that file, with the same overlay/source/status filters as project_findings, including source aliases for bare rule IDs and rule_pack:. Use this before editing a file when a shell or agent needs known active diagnostics without rerunning broad lint.

Inputs: filePath (required), limit, source, status, +5 more. Returns: _hints, filters, filePath, findings, +6 more

file_healthfile_healthC
Read-onlyIdempotent

Answer tool for file questions: summarize a file's role, dependents, and notable risks with evidence.

Inputs: file (required), projectId, projectRef. Returns: _hints, result, toolName, projectId

file_preflightfile_preflightA
Read-onlyIdempotent

Reef pre-edit composer for one file: returns durable findings, file-scoped diagnostic freshness, source-filtered recent runs, watcher diagnostic state, applicable conventions, and finding acknowledgement history in one read-only packet. Use before editing a file when an agent needs the operational gate without separate file_findings, verification_state, project_conventions, and finding_acks_report calls.

Inputs: filePath (required), sources, ackLimit, projectId, +6 more. Returns: _hints, filters, summary, filePath, +9 more

file_writeA
Destructive

Create or overwrite a file at a project-relative path. Returns a snapshot id for undo.

Inputs: path (required), content (required). Returns: ok, error, _hints, requiresHarnessSession

finding_ackfinding_ackA

Mutation tool for verified-safe markers: append one row to the finding_acks ledger so subsequent ast_find_pattern / lint_files callers that opt into the same category filter the match out. Category is caller-owned (for lint findings, finding.code is the recommended default). For ast_find_pattern matches, pass match.ackableFingerprint; for lint_files findings, pass finding.identity.matchBasedId. Append-only; duplicate (projectId, category, fingerprint) inserts persist as separate rows and dedupe at query time. Emits one RuntimeUsefulnessEvent per successful call.

Inputs: reason (required), category (required), fingerprint (required), subjectKind (required), +10 more. Returns: ack, _hints, preview, toolName, +2 more

finding_ack_batchfinding_ack_batchA

Mutation batch for reviewed finding acknowledgements: append many finding_acks rows in one call while sharing batch-level defaults for category, subjectKind, status, reason, acknowledgedBy, sourceToolName, and sourceRuleId. Use when a scan returns many reviewed false positives or accepted tradeoffs. Emits one finding_ack telemetry event per successful row.

Inputs: rows (required), reason, status, preview, +8 more. Returns: acks, _hints, preview, summary, +5 more

finding_acks_reportfinding_acks_reportA
Read-onlyIdempotent

Read-only inspection over the finding_acks ledger: return aggregate counts (by category, status, subjectKind, filePath) and a bounded reverse-chronological list of acks, filterable by category, subjectKind, filePath, status, and ISO time window. Use to see what operators have suppressed and which categories carry the most weight. Never writes to the ledger.

Inputs: limit, since, until, status, +5 more. Returns: acks, _hints, byStatus, toolName, +7 more

flow_mapflow_mapA
Read-onlyIdempotent

Graph tool for end-to-end flow questions: turn one graph path into ordered flow steps, transitions, and major boundary crossings.

Inputs: startEntity (required), targetEntity (required), direction, edgeKinds, +4 more. Returns: _hints, result, toolName, projectId

git_precommit_checkgit_precommit_checkA

Git pre-commit guard for staged TS/TSX files: reads staged blobs, checks API route auth guards and Next.js server/client boundary mistakes, persists staged Reef findings unless MAKO_REEF_BACKED disables the migration, and returns hook-friendly continue/stopReason output. Uses discovered project-profile auth guards/server-only modules plus optional .mako/git-guard.json/input allowlists. Never edits the index or worktree.

Inputs: projectId, projectRef, authGuardSymbols, publicRouteGlobs, +2 more. Returns: _hints, policy, gitRoot, continue, +10 more

graph_neighborsgraph_neighborsA
Read-onlyIdempotent

Graph tool for adjacency questions: traverse outward from one or more start entities with explicit direction, depth, and edge filters.

Inputs: startEntities (required), limit, direction, edgeKinds, +5 more. Returns: _hints, result, toolName, projectId

graph_pathgraph_pathA
Read-onlyIdempotent

Graph tool for connection questions: find one shortest typed path between two entities while keeping heuristic edges explicit and opt-in.

Inputs: startEntity (required), targetEntity (required), direction, edgeKinds, +5 more. Returns: _hints, result, toolName, projectId

health_trendhealth_trendA
Read-onlyIdempotent

Operator tool for project-state trend review: compare a recent trace window against a prior window without fabricating trend lines when history is thin.

Inputs: limit, projectId, projectRef. Returns: _hints, result, toolName, projectId

implementation_handoff_artifactimplementation_handoff_artifactB
Read-only

Artifact tool for reusable implementation handoff: compose one implementation brief and the current session handoff into a typed handoff artifact. Basis is session-scoped — session_handoff shifts with every tool call, so artifactId moves between calls by design (each call captures the current session state). Do not dedupe on artifactId.

Inputs: queryKind (required), queryText (required), export, projectId, +4 more. Returns: _hints, result, exported, toolName, +1 more

imports_cyclesimports_cyclesB
Read-onlyIdempotent

Imports tool for cycle detection: detect circular dependencies in the indexed internal import graph.

Inputs: projectId, projectRef. Returns: _hints, cycles, toolName, projectId, +1 more

imports_depsimports_depsA
Read-onlyIdempotent

Imports tool for direct dependencies: list a file's indexed imports and flag unresolved internal edges.

Inputs: file (required), projectId, projectRef. Returns: file, _hints, imports, toolName, +5 more

imports_hotspotsimports_hotspotsB
Read-onlyIdempotent

Imports tool for graph hotspots: rank the most connected files in the indexed internal import graph.

Inputs: limit, projectId, projectRef. Returns: limit, _hints, hotspots, toolName, +2 more

imports_impactimports_impactC
Read-onlyIdempotent

Imports tool for downstream impact: trace which indexed files depend on a file through the import graph.

Inputs: file (required), depth, projectId, projectRef. Returns: file, depth, _hints, toolName, +5 more

investigateinvestigateA
Read-onlyIdempotent

Workflow tool for bounded read-only investigation: run a short sequential tool chain over shipped workflows and return typed step history.

Inputs: question (required), budget, direction, projectId, +5 more. Returns: _hints, result, toolName, projectId

issues_nextissues_nextC
Read-onlyIdempotent

Operator tool for queue-oriented recommendations: derive one current issue plus queued follow-on issues from recent unresolved project traces.

Inputs: limit, projectId, projectRef. Returns: _hints, result, toolName, projectId

lint_fileslint_filesC

Code-intelligence tool for diagnostics on an indexed file set: run rule-packs, including canonicalHelper producer/consumer checks, plus TS-aware and structural alignment diagnostics; persist indexed Reef findings/run metadata under source lint_files; and return typed AnswerSurfaceIssue findings. Same engine that powers the answer loop and review_bundle, so findings stay consistent across surfaces.

Inputs: files (required), projectId, verbosity, projectRef, +3 more. Returns: _hints, findings, toolName, warnings, +5 more

list_reef_ruleslist_reef_rulesA
Read-onlyIdempotent

Reef read tool for rule metadata: list durable rule descriptors, optionally filtered by source namespace or enabled-by-default status. Descriptors explain which facts a finding source consumes and what rule ids mean.

Inputs: limit, projectId, projectRef, enabledOnly, +1 more. Returns: rules, _hints, filters, toolName, +4 more

mako_helpmako_helpA
Read-onlyIdempotent

Orientation tool for coding agents: given a natural-language task plus optional focusFiles, changedFiles, focusRoutes, focusSymbols, focusDatabaseObjects, route, table, or rpc anchors, return the recommended Mako workflow recipe as an ordered tool sequence with pre-filled suggestedArgs, batchable follow-ups, and notes. Use before reading long AGENTS/CLAUDE docs when deciding how to start with reef_ask and which specialist follow-ups to load. Read-only and does not execute the returned steps.

Inputs: task (required), rpc, route, table, +8 more. Returns: task, notes, steps, _hints, +5 more

owasp_auditowasp_auditA
Read-onlyIdempotent

Operator tool for OWASP Top 10 (2025) review: scan indexed TS/JS files for evidence-backed security issues mapped to OWASP categories (A01 broken access control, A02 misconfiguration, A04 crypto failures, A05 injection, A07 auth failures, A10 exceptional conditions) with CWE references and a direct_evidence/weak_signal honesty strength. Always returns a full 10-category coverage section, explicitly naming categories it does not statically check (A03 supply chain, A06 insecure design, A08 integrity, A09 logging). Advisory and heuristic — requires acknowledgeAdvisory:true; not a replacement for dedicated SAST/SCA. Read-only; does not persist findings.

Inputs: acknowledgeAdvisory (required), freshen, maxFiles, projectId, +4 more. Returns: _hints, result, toolName, projectId

oxlint_diagnosticsoxlint_diagnosticsA

Explicit Reef ingestion tool for Oxlint diagnostics: run the project's local Oxlint executable or JSON package script on requested project-relative files with --format json, persist working-tree ProjectFinding rows under source oxlint, and record unavailable/error/succeeded run status. File-mode only; does not run broad project lint.

Inputs: files (required), projectId, projectRef, scriptName, +1 more. Returns: _hints, status, command, exitCode, +12 more

preflight_tablepreflight_tableB
Read-onlyIdempotent

Return the full preflight surface for a table: columns, primary key, indexes, foreign keys, RLS state + policies, triggers, related routes, and zod schemas whose surrounding file references the table. Snapshot-strict.

Inputs: table (required), schema, projectId, projectRef. Returns: _hints, result, toolName, projectId

project_conventionsproject_conventionsB
Read-onlyIdempotent

Reef 9 convention view: surface explicit convention facts plus profile/index/rule-derived convention candidates such as auth guards, runtime boundaries, generated paths, route patterns, and schema usage conventions.

Inputs: kind, limit, status, projectId, +1 more. Returns: _hints, toolName, warnings, projectId, +3 more

project_diagnostic_runsproject_diagnostic_runsA
Read-onlyIdempotent

Reef read tool for diagnostic source runs: list recent lint/type adapter runs by source and status, including unavailable/error/succeeded state, duration, counts, command, config, cwd, metadata, and derived cache freshness/age. Use this to distinguish no findings from a diagnostic source that did not run or ran too long ago.

Inputs: limit, source, status, projectId, +2 more. Returns: runs, _hints, filters, toolName, +4 more

project_factsproject_factsA
Read-onlyIdempotent

Reef read tool for durable project facts: query facts by overlay, source, kind, and subject fingerprint. Use this when an agent or shell needs the calculated substrate behind findings without rerunning analysis.

Inputs: kind, limit, source, overlay, +4 more. Returns: facts, _hints, filters, toolName, +5 more

project_findingsproject_findingsA
Read-onlyIdempotent

Reef read tool for active project findings: query the durable Reef findings view by overlay, source, status, and resolved inclusion. The source filter accepts a producer source, bare rule ID, or rule_pack:. Acknowledged status is derived from the existing finding_ack ledger, so this is the canonical read path for Reef-native lint/rule findings.

Inputs: limit, source, status, overlay, +4 more. Returns: _hints, filters, findings, toolName, +5 more

project_index_refreshproject_index_refreshA

Mutation tool for index freshness: run the project indexer through the current project-store cache when the snapshot is stale, unknown, deleted, or has unindexed files, then return before/after freshness summaries and the new index run. In if_stale mode, unknown freshness refreshes defensively and unindexed files count as stale work.

Inputs: mode, reason, projectId, projectRef. Returns: run, after, stats, _hints, +8 more

project_index_statusproject_index_statusA
Read-onlyIdempotent

Project tool for index freshness: compare indexed file rows against live disk metadata, report Reef working-tree fact freshness, watch state, latest index run, unindexedScan status, and a suggested next action. By default this checks indexed rows only and reports that the new-file scan was skipped; pass includeUnindexed: true to pay the repo walk cost and get an exact count/details for files not yet in the index. Trust/stability is not freshness; this tool answers whether the index snapshot is current.

Inputs: projectId, verbosity, projectRef, includeUnindexed. Returns: watch, _hints, toolName, freshness, +9 more

project_open_loopsproject_open_loopsA
Read-onlyIdempotent

Reef 8 open-loop view: list unresolved active findings, stale or unknown facts, and stale or failed diagnostic runs so an agent can see what still needs attention without rerunning broad checks.

Inputs: limit, filePath, projectId, projectRef, +2 more. Returns: loops, _hints, summary, filePath, +5 more

recall_answersrecall_answersA
Read-onlyIdempotent

Read-only session-recall tool: search prior project answer traces by text, query kind, support level, trust state, and ISO time window. Returns bounded answer summaries, pre-cap matchCount, truncation signal, and optional stored answer markdown. Does not run the answer loop or infer freshness.

Inputs: limit, query, since, until, +5 more. Returns: _hints, answers, toolName, warnings, +4 more

recall_tool_runsrecall_tool_runsA
Read-onlyIdempotent

Read-only session-recall tool: inspect prior project tool_runs by tool name, outcome, request id, and ISO time window. Returns bounded summaries with runId plus requestId when available; use requestId as agent_feedback.referencedRequestId. Default limit is 50, max 500. Persisted payloads are only included when includePayload is true.

Inputs: limit, since, until, outcome, +5 more. Returns: _hints, toolName, toolRuns, warnings, +4 more

reef_agent_statusreef_agent_statusA
Read-onlyIdempotent

Reef agent-loop status summary: report maintained known issues, changed files needing verification, stale diagnostic sources, schema freshness, watcher degradation, and background queue state. Never edits files.

Inputs: limit, projectId, focusFiles, projectRef, +1 more. Returns: state, _hints, schema, summary, +9 more

reef_askreef_askA
Read-onlyIdempotent

Primary Reef query engine facade: ask one project question and receive a compiled codebase plus database evidence packet with compact answer sections, ranked context, findings, risks, open loops, diagnostic freshness, a normalized evidence graph, and suggested next actions. Internally handles bounded quoted literal checks, materialized DB inventories, specific table/column/RLS/index/FK/trigger questions, where-used/impact questions, and verification-gate questions with typed summaries. Raw evidence defaults to compact: per-section item caps plus omission of the raw evidence-graph nodes/edges and heavy per-item provenance/diagnostic detail (node/edge and section totals are still reported, and long finding messages are clipped). Pass evidenceMode="full" for the uncapped raw evidence and full graph, or includeTrace=true for the decision trace and engine steps. Read-only; uses internal Reef/context modules instead of model-orchestrated MCP tool chains.

Inputs: question (required), mode, projectId, focusFiles, +18 more. Returns: _hints, answer, limits, evidence, +8 more

reef_diff_impactreef_diff_impactA
Read-onlyIdempotent

Reef mid-edit impact composer: for changed working-tree files, return affected import callers, active caller findings that may need re-checking, and conventions the diff or impacted callers may violate. Reads existing working_tree_overlay facts and import graph state; it does not refresh or mutate Reef.

Inputs: filePaths (required), depth, projectId, projectRef, +4 more. Returns: _hints, filters, summary, toolName, +8 more

reef_impactreef_impactA
Read-onlyIdempotent

Thin Reef impact query: for changed files, return affected import callers, invalidated findings, and convention risks through the primary Reef surface. Equivalent calculation to reef_diff_impact with a smaller model-facing name.

Inputs: filePaths (required), depth, projectId, projectRef, +4 more. Returns: _hints, filters, summary, toolName, +8 more

reef_inspectreef_inspectA
Read-onlyIdempotent

Reef 7 inspection view: explain one file or subject fingerprint by returning its durable facts, findings, and relevant diagnostic runs. Use after reef_scout when the model needs the evidence trail and freshness details before editing.

Inputs: limit, filePath, projectId, projectRef, +1 more. Returns: facts, _hints, summary, filePath, +8 more

reef_instructionsreef_instructionsA
Read-onlyIdempotent

Reef read tool for scoped project instructions: load .mako/instructions.md and applicable AGENTS.md files for requested project-relative files, returning structured instruction items plus derived Reef fact shapes. Reads only inside the project root and does not persist facts.

Inputs: files, projectId, projectRef, includeDerivedFacts. Returns: files, _hints, summary, toolName, +5 more

reef_known_issuesreef_known_issuesC
Read-onlyIdempotent

Reef warm issue query: answer "have any errors?" from maintained Reef findings and diagnostic readiness state without launching broad lint or typecheck commands.

Inputs: files, limit, sources, projectId, +4 more. Returns: _hints, issues, summary, toolName, +5 more

reef_learning_reviewreef_learning_reviewA
Read-onlyIdempotent

Suggestion-only Reef learning review: propose rule-pack, sentinel, instruction, convention, conjecture, or session-recall candidates from resolved findings, repeated rule history, recent tool runs, and agent feedback. Never writes durable knowledge; acceptance must happen through an explicit separate write path.

Inputs: mode, limit, since, projectId, +5 more. Returns: mode, _hints, summary, toolName, +6 more

reef_overlay_diffreef_overlay_diffA
Read-onlyIdempotent

Reef read tool for overlay comparison: diff durable facts between two overlays, defaulting indexed vs working_tree, with optional filePath/kind/source filters. Use after working_tree_overlay or before edits to see exactly what Reef believes changed without rerunning diagnostics.

Inputs: kind, limit, source, filePath, +6 more. Returns: _hints, entries, summary, toolName, +5 more

reef_scoutreef_scoutA
Read-onlyIdempotent

Reef 7 model-facing scout view: turn a messy request into intent-weighted, explainable candidates from durable Reef facts, findings, rules, and diagnostic runs. App-flow queries prefer files/routes/findings; RLS/schema queries prefer database evidence. This is a context scout, not an editing agent; use normal harness read/search after the packet.

Inputs: query (required), limit, projectId, focusFiles, +2 more. Returns: facts, query, _hints, findings, +7 more

reef_statusreef_statusB
Read-onlyIdempotent

Thin Reef status query: report maintained known issues, changed files needing verification, stale diagnostic sources, schema freshness, watcher degradation, and background queue state through the primary Reef surface.

Inputs: limit, projectId, focusFiles, projectRef, +1 more. Returns: state, _hints, schema, summary, +9 more

reef_verifyreef_verifyC
Read-onlyIdempotent

Thin Reef verification query: combine diagnostic freshness, changed files, watcher state, recent diagnostic runs, and unresolved open loops into one completion gate. Read-only and does not run diagnostics.

Inputs: files, limit, sources, projectId, +5 more. Returns: _hints, status, summary, toolName, +7 more

reef_where_usedreef_where_usedA
Read-onlyIdempotent

Reef maintained structural query: answer where a symbol, component, route, file, or indexed pattern is defined and used from maintained symbols/imports/routes first, then supplement symbol/component answers with indexed identifier-text references and related durable findings. Does not run grep; coverage explains import-graph/text/finding limits and returns fallback tool args when maintained state has no answer.

Inputs: query (required), limit, projectId, projectRef, +2 more. Returns: query, _hints, usages, coverage, +10 more

repo_maprepo_mapA
Read-onlyIdempotent

Code-intelligence tool for repo orientation: emit a token-budgeted aider-style outline of the indexed project (ranked files + key symbols) as first-turn context for agents meeting an unfamiliar codebase. Ranking uses import-graph PageRank, personalized bidirectionally around focusFiles, focusRoutes, focusSymbols, or focusDatabaseObjects when supplied so nearby dependencies and dependents surface first. Symbol selection prefers exported declarations. Read-only; default budget 1024 tokens (char/4 approximation), cap 16384.

Inputs: maxFiles, pathGlob, projectId, focusFiles, +6 more. Returns: files, _hints, rendered, toolName, +8 more

review_bundle_artifactreview_bundle_artifactC
Read-onlyIdempotent

Artifact tool for reviewer-facing change inspection: compose implementation brief, change plan, optional flow map, and optional tenant audit into one typed review bundle. Basis is stable — identical inputs produce the same artifactId, so callers may dedupe on it.

Inputs: queryKind (required), queryText (required), startEntity (required), targetEntity (required), +12 more. Returns: _hints, result, exported, toolName, +1 more

route_contextroute_contextA
Read-onlyIdempotent

Neighborhood composer for one route: combines route_trace route resolution, file_health handler summary, imports_deps direct imports/dependents, schema_usage touches, trace_rpc downstream table edges, and db_rls policy surfaces.

Inputs: route (required), projectId, projectRef, maxPerSection. Returns: route, trust, _hints, toolName, +12 more

route_traceroute_traceB
Read-onlyIdempotent

Answer tool for route questions: trace a route to the indexed handler, matching files, and nearby evidence.

Inputs: route (required), projectId, projectRef. Returns: _hints, result, toolName, projectId

rpc_neighborhoodrpc_neighborhoodB
Read-onlyIdempotent

Neighborhood composer for one RPC: combines db_rpc-equivalent schema snapshot signature/body, schema_usage app-code callers, trace_rpc function-to-table refs, and db_rls policies on touched tables into one bounded bundle.

Inputs: rpcName (required), argTypes, projectId, projectRef, +2 more. Returns: rpc, trust, _hints, callers, +10 more

rule_memoryrule_memoryA
Read-onlyIdempotent

Reef 9 rule-memory view: aggregate Reef rule descriptors and finding history so agents can see which rules are active, acknowledged, resolved, or suppressed before making changes.

Inputs: limit, projectId, projectRef, sourceNamespace. Returns: _hints, entries, toolName, warnings, +3 more

rule_pack_validaterule_pack_validateA
Read-onlyIdempotent

Read-only Reef rule-pack authoring tool: validate .mako/rules YAML packs, including canonicalHelper cross-file declarations; return pack/rule counts, schema errors, and optional ReefRuleDescriptor previews without running diagnostics or writing Reef state.

Inputs: projectId, projectRef, includeDescriptors. Returns: packs, rules, _hints, summary, +4 more

runtime_telemetry_reportruntime_telemetry_reportA
Read-onlyIdempotent

Read-only inspection over mako_usefulness_events (Phase 8.1): return aggregate counts (by decisionKind, by family, by grade) and a bounded list of recent events, filterable by decisionKind, family, requestId, and ISO time window. Use to verify usefulness capture is flowing or to triage why a decision site emitted the grade it did. Never writes to the event table.

Inputs: limit, since, until, family, +4 more. Returns: _hints, events, byGrade, byFamily, +7 more

schema_usageschema_usageA
Read-onlyIdempotent

Answer tool for schema questions: find where an indexed schema object is defined and directly referenced in app code. RPC-mediated touches are intentionally excluded; use trace_rpc, route_context, table_neighborhood, or flow_map for transitive schema paths.

Inputs: object (required), schema, projectId, projectRef. Returns: _hints, result, toolName, projectId, +2 more

session_handoffsession_handoffC
Read-onlyIdempotent

Operator tool for derived project-state handoff: summarize recent answer traces, active unresolved focus, and recorded follow-up momentum.

Inputs: limit, projectId, projectRef. Returns: _hints, result, toolName, projectId

shell_runA
Destructive

Run a shell command with arguments as a list (never concatenated). cwd is locked to the project root or a subdirectory; env keys must be allowlisted.

Inputs: args (required), command (required), cwd, env, +1 more. Returns: ok, error, _hints, requiresHarnessSession

suggestsuggestB
Read-onlyIdempotent

Workflow tool for tool-chain recommendations: choose one canonical workflow or a short ordered sequence without executing hidden planner logic.

Inputs: question (required), maxSteps, direction, projectId, +5 more. Returns: _hints, result, toolName, projectId

symbols_ofsymbols_ofB
Read-onlyIdempotent

Symbols tool for declarations: list the indexed symbols declared in a file.

Inputs: file (required), projectId, projectRef. Returns: file, _hints, symbols, toolName, +4 more

table_neighborhoodtable_neighborhoodA
Read-onlyIdempotent

Neighborhood composer for one table: combines db_table_schema/db_rls-equivalent schema snapshot data, schema_usage read/write sites, trace_table RPC-to-table edges, and route_trace handler routes into one bounded typed bundle.

Inputs: tableName (required), projectId, projectRef, schemaName, +1 more. Returns: rls, reads, table, trust, +11 more

task_preflight_artifacttask_preflight_artifactA
Read-onlyIdempotent

Artifact tool for start-of-work preparation: compose implementation brief, verification plan, change plan, and flow map into one typed preflight artifact. Basis is stable — identical inputs produce the same artifactId, so callers may dedupe on it.

Inputs: queryKind (required), queryText (required), startEntity (required), targetEntity (required), +8 more. Returns: _hints, result, exported, toolName, +1 more

tenant_leak_audittenant_leak_auditB
Read-onlyIdempotent

Operator tool for tenant-boundary review: audit tenant-keyed tables, RLS posture, and RPC/code touch points without making generic security-score claims.

Inputs: acknowledgeAdvisory (required), freshen, projectId, projectRef, +2 more. Returns: _hints, result, toolName, projectId

tool_batchtool_batchA
Read-only

Read-only batching wrapper for independent Mako lookups. The input schema only accepts batchable read-only tools; runtime also rejects mutation tools and recursive tool_batch calls defensively. With continueOnError=true, operations run with bounded concurrency while results preserve input order; tune maxConcurrency to trade latency against shared-store pressure. continueOnError=false keeps fail-fast sequential execution. Returns labeled sub-results with per-op duration plus summary latency metadata including totalOpDurationMs and slowestOp. Use verbosity: "compact" or per-op resultMode: "summary" to return compact summaries instead of full payloads; per-op resultMode: "full" keeps the full output. Each sub-op's projectId is overridden with the parent batch's resolved project, so all ops run against one project. Use to reduce round-trips after a context_packet recommends several expansions.

Inputs: ops (required), maxOps, projectId, verbosity, +3 more. Returns: _hints, results, summary, toolName, +3 more

trace_edgetrace_edgeA
Read-onlyIdempotent

Trace a handler / edge function: its own route, app-code callers (ast-grep on fetch('/functions/v1/$NAME') and supabase.functions.invoke('$NAME')), tables and RPCs the handler touches, and DB triggers whose body references the name. Snapshot-strict.

Inputs: name (required), projectId, projectRef. Returns: _hints, result, toolName, projectId

trace_errortrace_errorA
Read-onlyIdempotent

Trace an error term across throw sites (ast-grep throw new Error($MSG), throw new $ERR($MSG)), catch handlers (ast-grep try/catch), and PL/pgSQL bodies that reference the term. FTS narrows the ast-grep pass. Snapshot-strict.

Inputs: term (required), projectId, projectRef. Returns: _hints, result, toolName, projectId

trace_filetrace_fileA
Read-onlyIdempotent

Trace a file end-to-end from the snapshot: declared symbols, outbound imports, inbound dependents, routes contributed, and related evidence. Read-only.

Inputs: file (required), projectId, projectRef. Returns: _hints, result, toolName, projectId

trace_rpctrace_rpcA
Read-onlyIdempotent

Trace an RPC end-to-end: the RPC definition (searchSchemaObjects filtered to rpc), other PL/pgSQL bodies whose body text references it (searchSchemaBodies), overload-aware table refs (listFunctionTableRefs), and app-code .rpc('$FN') call sites (FTS-retrieval + ast-grep proof). Snapshot-strict.

Inputs: name (required), schema, argTypes, projectId, +1 more. Returns: _hints, result, toolName, projectId

trace_tabletrace_tableA
Read-onlyIdempotent

Trace a table end-to-end: columns, indexes, foreign keys, RLS, triggers (via getSchemaTableSnapshot), schema-scoped RPC → table edges (via listFunctionTableRefs), and app-code .from('$TABLE') call sites (FTS-retrieval + ast-grep proof). Snapshot-strict.

Inputs: table (required), schema, projectId, projectRef. Returns: _hints, result, toolName, projectId

typescript_diagnosticstypescript_diagnosticsA

Explicit Reef ingestion tool for semantic TypeScript compiler diagnostics: read tsconfig, run the TypeScript program with no emit, persist working-tree ProjectFinding rows under source typescript, and return bounded findings. This may run a broad typecheck; use diagnostic_refresh with typescript_syntax for syntax-only refresh.

Inputs: files, projectId, projectRef, maxFindings, +1 more. Returns: _hints, status, findings, toolName, +11 more

verification_bundle_artifactverification_bundle_artifactA
Read-onlyIdempotent

Artifact tool for safe completion and verification: compose verification plan, project-intelligence signals, and optional tenant audit into one typed verification bundle. Basis is stable by default; artifactId shifts across calls only when includeSessionHandoff or includeIssuesNext is set, because those inputs are session-scoped. Dedupe is safe when both flags are off.

Inputs: queryKind (required), queryText (required), export, traceId, +9 more. Returns: _hints, result, exported, toolName, +1 more

verification_stateverification_stateA
Read-onlyIdempotent

Reef 8 verification state view: summarize whether cached diagnostic runs still cover the current working-tree overlay, including file-scoped recent runs, watcher diagnostic state, files modified after successful checks, and suggested verification actions. With files, runs only count when project-wide or scoped to those files.

Inputs: files, limit, sources, projectId, +2 more. Returns: _hints, status, sources, watcher, +8 more

workflow_packetworkflow_packetC
Read-onlyIdempotent

Workflow tool: generate a typed workflow packet from a project-scoped query answer and expose watch/surface metadata.

Inputs: family (required), queryKind (required), queryText (required), scope, +9 more. Returns: _hints, result, toolName, projectId

working_tree_overlayworking_tree_overlayB

Advisory Reef mutation: snapshot working-tree file facts for explicit files, watcher-dirty paths, or non-fresh indexed paths. Persists file_snapshot facts with size, mtime, line count, sha256, or deleted state; it does not reparse AST, imports, routes, or schema.

Inputs: files, maxFiles, projectId, projectRef, +1 more. Returns: facts, _hints, toolName, warnings, +5 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 105 tools

    Disambiguation1/5

    With 105 tools, several are near-duplicates: reef_status and reef_agent_status describe essentially the same status report, and reef_impact is explicitly an equivalent of reef_diff_impact. Large clusters around status, verification, diagnostics, and querying blur boundaries, so an agent will frequently struggle to pick the right tool.

    Naming Consistency3/5

    Most names are readable snake_case with useful prefixes like trace_*, db_*, and file_*, but the conventions are mixed: verb_noun (trace_table), noun_noun (schema_usage), and bare verbs (ask, suggest, investigate) all appear. The inconsistent word order and singular/plural choices across families prevent a fully predictable pattern.

    Tool Count1/5

    105 tools is an extreme count for any MCP server, far beyond the 50+ threshold for a 1. The breadth does not justify the size because many tools are near-duplicates or slight variants rather than distinct capabilities.

    Completeness3/5

    Coverage is broad across code search, tracing, database inspection, diagnostics, findings, and session recall, but there is no simple file read tool despite full file mutation tools, and the four artifact composers have no artifact read/list counterpart. Shell_run and live_text_search can work around some gaps, but the lifecycle is not complete.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Local-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.
      5
      12 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local-first codebase intelligence layer for AI coding agents, providing a persistent, queryable model of a repository via an MCP server and CLI to enable structure queries instead of reading many files.
      1
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides a local-first code indexing and search engine for coding agents via MCP, enabling precise codebase queries, symbol lookup, and freshness-aware retrieval.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Local-first code intelligence MCP server that enables coding agents to search code, inspect structure, read exact ranges, and explore Git history with explicit token budgets.
      179
      Apache 2.0