Skip to content

Tool decision matrix

Use this matrix to pick a tool from an intent. Every tool name resolves to mcp__opencodehub__<name> in the agent’s tool namespace. The anti-pattern column says what not to reach for first.

IntentToolWhy this oneDon’t use
”What does this function do?”contextReturns the symbol’s signature, callers, callees, and the processes it participates in — one call.query (returns search hits, not the 360° view); Read (you’ll miss the call graph).
”If I change this, what breaks?”impactComputes upstream/downstream blast radius up to depth N, with a risk tier.Grep (misses re-exports and dynamic dispatch).
”Find me code about X”queryHybrid BM25 + vector search, results grouped by execution flow.Embeddings-only search; Grep for concepts.
”Plan a rename / refactor across files”context + impactRead-only. context lists every inbound/outbound ref, impact gives the dependent edit list and risk tier; you apply the edits in your editor, then verify with detect_changes. Catches dynamic dispatch, re-exports, and shadowed locals an editor’s textual rename misses.Expecting an MCP tool to write the edits — the surface is read-only.
”Bundle the codebase for an LLM”pack_codebaseDeterministic 9-item BOM (manifest, skeleton, file-tree, deps, AST chunks, xrefs, optional embeddings, findings, licenses + readme) — byte-identical for the same (commit, tokenizer, budget).Hand-rolled cat **/*.ts blob.
”Who owns this file?”ownersTop contributors with commit counts, last-touched dates, lines changed.git blame parsing.
”What’s the repo’s overall shape?”project_profileOne call: language mix, top processes, hotspots, dependencies summary.Multiple query calls.
”What external packages do I depend on?”dependenciesReturns the full external-dep list, scoped per package.Reading package.json files manually.
”What changed since this commit?”detect_changesMaps an uncommitted or committed diff to affected symbols and processes.git diff (no graph context).
”Run scanners now”scanSpawns the 20 Priority-1 scanners and writes SARIF. openWorld — only when the user explicitly asks.Calling scan to “see if anything’s wrong” without consent.
”Are there security findings on this branch?”list_findings_deltaDiffs the latest scan against the frozen baseline (new / fixed / unchanged / updated).list_findings if you only need the delta.
”Show all current findings”list_findingsFilterable by severity, scanner, file.Re-running scan if a recent scan exists.
”Is this PR safe to merge?”verdict5-tier merge decision: auto_merge / single_review / dual_review / expert_review / block. Exit codes 0/1/2 from CLI.Stitching impact + list_findings_delta by hand.
”What HTTP routes does this service expose?”route_mapMethod, path, handler, file:line. Works across Express, Fastify, Hono, FastAPI, Flask, Spring, etc.Grep for app.get(.
”What’s the structural shape of this payload?”shape_checkDetects payload/type drift across handlers and clients.Manual diff of TypeScript interfaces.
”What CLI/MCP tools does this codebase ship?”tool_mapSurfaces commander/yargs/click handlers and MCP tool registrations.Reading every entry-point manually.
”What’s been deprecated or dead?”list_dead_codeRead-only listing of unreferenced exports, dead functions, orphan files. Review the candidates, then delete them yourself — no MCP tool edits source.tsc --noUnusedLocals (catches different things).
”What’s the license tier of my deps?”license_auditTiers each transitive dep: permissive / weak-copyleft / strong-copyleft / proprietary / unknown.license-checker raw output.
”Which areas are getting riskier?”risk_trendsPer-community trend lines + 30-day projection from temporal data.One-off risk snapshots.
”Who is changing what most, and where”risk_trends + ownersTrends point to communities; owners names the people.Either alone.
”Bespoke temporal query (cochanges / summaries)“sqlRead-only SQL against the temporal store (cochanges + symbol_summaries), 5s timeout. NOT the node/edge graph.A typed tool covers it; or you need the graph — use Cypher (MCP sql cypher arg).

group_* tools require an indexed group. Run codehub group sync to register one. See Cross-repo groups.

IntentToolWhy this oneDon’t use
”Which repos are in my group, and are they fresh?”group_list + group_statusInventory + per-repo staleness.list_repos (single-repo scope).
”Search across the whole group”group_queryFans out BM25 across the group. Returns { group, query, results[] }.Calling query per repo.
”Which services consume this API?”api_impact (group)Edges from API surface to downstream consumers across repos.Grep across cloned repos.
”Map the HTTP contract surface across services”group_contractsProducer/consumer matrix derived from route_map + client calls.Hand-merged Postman collections.
”Where does the group share types or DB schemas?”group_cross_repo_linksCross-repo references — typed shared models, schema imports, etc.Searching every repo manually.

Some questions decompose:

  • PR review without verdict: chain detect_changesimpactlist_findings_delta → summarize. verdict does this in one call with a tier; use the chain when you need bespoke shaping.
  • Pre-rename safety: contextimpact → review the edit list → apply edits in your editor → detect_changes to verify scope. The MCP surface is read-only; it plans and verifies, you make the edits.
  • New-engineer onboarding: project_profile → top processes from query → entry points from route_map and tool_mapowners per area. The codehub-onboarding skill orchestrates this for Claude Code.