Skip to content
Agentmart
Submit a tool

Grasp — Code Architecture & Dependency Analysis

Codebase analysis: dependency graphs, security scanning, and refactor plans for GitHub and GitLab.

Connector by ashfordeOU · GitHub account verified by the MCP Registry

IndexedLicense unknownLocal (stdio)★ 30
Write a review

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/ashfordeou-grasp

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Codebase analysis: dependency graphs, security scanning, and refactor plans for GitHub and GitLab.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
137 read · 9 write · 1 delete · 3 not yet classified
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Tools by what they do 150

Read from the source code; the running server may list different tools.

Read 137 · Look things up without changing anything.

  • call_chain
  • function_graph
  • graph_query
  • grasp_abi_diff
  • grasp_adr
  • grasp_analyze
  • grasp_anomaly
  • grasp_api_diff
  • grasp_api_impact
  • grasp_api_stability
  • grasp_api_surface
  • grasp_arch_diff
Show 125 more tools
  • grasp_architecture
  • grasp_architecture_overview
  • grasp_ask
  • grasp_brain_status
  • grasp_bridge_nodes
  • grasp_bundle
  • grasp_change_risk
  • grasp_ci_status
  • grasp_commits
  • grasp_communities
  • grasp_confidence
  • grasp_context
  • grasp_contracts
  • grasp_contributors
  • grasp_coverage
  • grasp_coverage_gaps
  • grasp_cross_repo
  • grasp_cycles
  • grasp_db_coupling
  • grasp_dead_packages
  • grasp_dep_impact
  • grasp_dependents
  • grasp_deps_dev
  • grasp_detect_changes
  • grasp_diagram
  • grasp_diff
  • grasp_diff_snapshots
  • grasp_diff_symbols
  • grasp_dora
  • grasp_duties
  • grasp_ecss
  • grasp_embed
  • grasp_env_vars
  • grasp_eval_coverage
  • grasp_events
  • grasp_exec_flow
  • grasp_explain
  • grasp_export_csv
  • grasp_export_cypher
  • grasp_export_d2
  • grasp_export_dgml
  • grasp_export_dot
  • grasp_export_drawio
  • grasp_export_gexf
  • grasp_export_graphml
  • grasp_export_mermaid
  • grasp_export_obsidian
  • grasp_export_plantuml
  • grasp_feature_flags
  • grasp_file_deps
  • grasp_find_path
  • grasp_fork_diff
  • grasp_good_first_issues
  • grasp_graph_schema
  • grasp_group_list
  • grasp_heritage
  • grasp_hooks
  • grasp_hotspots
  • grasp_hub_nodes
  • grasp_icd
  • grasp_irq
  • grasp_issues
  • grasp_kconfig
  • grasp_kg_ask
  • grasp_kg_explain
  • grasp_kg_export
  • grasp_kg_stats
  • grasp_kg_trace
  • grasp_knowledge_gaps
  • grasp_latency
  • grasp_license
  • grasp_llm_status
  • grasp_metrics
  • grasp_migration_plan
  • grasp_minimal_context
  • grasp_model_risk
  • grasp_mro
  • grasp_multilang
  • grasp_onboard
  • grasp_org_graph
  • grasp_org_summary
  • grasp_orm_map
  • grasp_patch_impact
  • grasp_patterns
  • grasp_perf
  • grasp_pii_trace
  • grasp_plugins
  • grasp_pr_comment
  • grasp_refactor
  • grasp_reg_impact
  • grasp_registry_list
  • grasp_registry_status
  • grasp_req_trace
  • grasp_resolve_receiver
  • grasp_reuse
  • grasp_route_map
  • grasp_rules_check
  • grasp_run_diff
  • grasp_runtime_calls
  • grasp_safety_trace
  • grasp_sarif
  • grasp_sbom
  • grasp_search
  • grasp_security
  • grasp_semantic_search
  • grasp_semver
  • grasp_sessions
  • grasp_shape_check
  • grasp_similarity
  • grasp_skillmd
  • grasp_stale
  • grasp_subsystems
  • grasp_suggest
  • grasp_suggested_questions
  • grasp_surprising_connections
  • grasp_timeline
  • grasp_tool_map
  • grasp_traverse
  • grasp_type_propagation
  • grasp_types
  • grasp_unused
  • grasp_vulnerabilities
  • grasp_watch
  • grasp_wiki
  • type_propagation

Write 9 · Create, change, send or run things.

  • grasp_apply_refactor
  • grasp_brain_index
  • grasp_generate_agents_md
  • grasp_generate_skills
  • grasp_group_add
  • grasp_pr_review
  • grasp_service_graph
  • grasp_snapshot
  • grasp_vuln_watch

Delete 1 · Delete, drop, revoke or wipe things.

  • grasp_rename

Not yet classified 3 · We could not tell from the name and description.

  • grasp_config_check
  • grasp_ingest
  • grasp_jira_issues

Network hosts it talks to 30

  • acme.atlassian.net · found in code
  • api.anthropic.com · found in code
  • api.bitbucket.org · found in code
  • api.deepseek.com · found in code
  • api.deps.dev · found in code
  • api.github.com · found in code
  • api.moonshot.cn · found in code
  • api.openai.com · found in code
  • api.osv.dev · found in code
  • api.securityscorecards.dev · found in code
  • api.socket.dev · found in code
  • app.diagrams.net · found in code
  • ashforde.github.io · found in code
  • ashfordeou.github.io · found in code
  • cdn.jsdelivr.net · found in code
  • checkout.stripe.com · found in code
  • dev.azure.com · found in code
  • generativelanguage.googleapis.com · found in code
  • gexf.net · found in code
  • git.mycompany.com · found in code
  • github.com · found in code
  • graphml.graphdrawing.org · found in code
  • grasp.tool · found in code
  • nvd.nist.gov · found in code
  • osv.dev · found in code
  • raw.githubusercontent.com · found in code
  • schemas.microsoft.com · found in code
  • services.nvd.nist.gov · found in code
  • socket.dev · found in code
  • structurizr.com · found in code

Files it touches

  • Your home directory (~)
  • ~/.grasp/sessions
  • ~/project/myproject
  • Any path the agent passes to its tools

Tools (150)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • call_chainCall Chainread-only

    Traverse the call graph N hops from a named function. Returns callers, callees, or both. Requires grasp_brain_index to have been run first.

  • function_graphFunction Subgraphread-only

    Render a subgraph centred on a named function — its callers and callees up to the given depth. Output formats: - mermaid: paste directly into GitHub markdown or VS Code preview - dot: Graphviz compatible - json: raw nodes/edges Requires grasp_brain_index to have been run first.

  • graph_queryGraph Cypher Queryread-only

    Run a read-only Cypher query against the Grasp graph database for a repo. The graph is populated by grasp_brain_index. It contains: - Function nodes: id, name, filePath, repoId, returnType, startLine - File nodes: id, path, language, repoId - CALLS edges: Function → Function (count) - DEFINES edges: File → Function - SAME_RETURN_TYPE edges: Function → Function (typeName) repoId is included in the response to help scope queries with {repoId: '<id>'} filters. Example queries: MATCH (f:Function {repoId: '<id>'}) RETURN f.name, f.returnType LIMIT 20 MATCH (a:Function)-[:CALLS*1..3…

  • grasp_abi_diffABI / API Stability Checkerread-only

    Compare exported symbols between two sessions. For C/C++: function signatures in headers. For JS/TS: non-underscore exports. Flags removed exports (breaking), signature changes (breaking), new exports (non-breaking). Works for any language.

  • grasp_adrADR Generatorread-only

    Generate an Architecture Decision Record (MADR format) from codebase analysis data and optional PR context

  • grasp_analyzeAnalyze Repositoryread-only

    Analyze a GitHub repository or local directory and return a full dependency graph, architecture map, issues, security findings, and health score. This is the primary entry point. Run this first — it returns a session_id used by all other grasp_* tools. Args: - source (string): GitHub repo as "owner/repo" or "https://github.com/owner/repo", GitLab URL, Bitbucket URL (bitbucket.org/workspace/repo), Azure DevOps URL (dev.azure.com/org/project/_git/repo), Gitea URL, GitHub Enterprise URL, OR local path like "/path/to/repo" or "./my-project" - token (string, optional): GitHub personal access …

  • grasp_anomalyAnomaly Investigationread-only

    Build a structured investigation package for a suspect file — callers, callees, transitive blast radius, security issues in the call chain, and a plain-English summary

  • grasp_api_diffBreaking API Change Detectorread-only

    Compare two sessions of the same repo and detect breaking API changes — removed exports, parameter count changes. Returns severity-ranked list of breaking changes with affected caller counts. Args: - session_id_old: baseline session - session_id_new: new session to compare against

  • grasp_api_impactAPI Route Impact Analysisread-only

    Given a route path or handler function name, return the blast radius: all files that call the handler, all upstream callers, and a risk score. Uses the brain store dependency edges. Requires the repo to be indexed via grasp_brain_index.

  • grasp_api_stabilityAPI Stability Scoreread-only

    Score 0–100 measuring how stable the public API surface is between two sessions. 100 = zero breaking changes, 0 = complete API rewrite. For library authors.

  • grasp_api_surfaceMap API surface: OpenAPI/GraphQL specs to source file implementationsread-only

    Scans source files for route declarations (Express, FastAPI, Flask, Next.js App Router) and parses OpenAPI/GraphQL specs to produce a unified API surface map. Returns endpoints grouped by method and file, identifies undocumented routes, and reports spec coverage. Use after grasp_analyze.

  • grasp_apply_refactorApply refactor — execute rename ops

    Executes one or more rename operations across files in the session. dry_run=true (default) returns the diff preview without writing. dry_run=false writes modified files back to disk (local sources only). Use target_files to restrict to a subset.

  • grasp_arch_diffArchitecture Diffread-only

    Compare the current analysis result for a session against what was previously indexed in the Grasp brain, highlighting grade degradations, health delta, and new security issues.

  • grasp_architectureGet Architecture Layersread-only

    Get files grouped by architecture layer (routes/services/models/utils/components/test etc.). Useful for understanding codebase structure before making changes. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - layer (string, optional): Filter to a specific layer (e.g. "services", "data", "test") Returns: { "layers": { "services": { "count": number, "files": string[] }, "data": { "count": number, "files": string[] }, ... } }

  • grasp_architecture_overviewArchitecture overview — combined community, hub, and review-question reportread-only

    Single high-level architecture summary: layer breakdown with top-3 hubs per layer, cross-layer coupling count, top surprising connections, weak communities, and the top-5 review questions Grasp would ask. Use this after grasp_analyze for an executive view.

Show 135 more tools
  • grasp_askAsk Architectureread-only

    Ask natural language questions about the codebase architecture using the Grasp brain. Examples: "what are the most complex files?", "show me security issues", "which files have the highest blast radius?", "show me files with grade F".

  • grasp_brain_indexIndex Repo into Brain

    Analyze a repo or local path and persist the result into the Grasp brain database (~/.grasp/brain.db) for fast offline queries.

  • grasp_brain_statusBrain Statusread-only

    List all repos indexed in the Grasp brain database.

  • grasp_bridge_nodesBridge nodes — betweenness centralityread-only

    Ranks files by Brandes betweenness centrality on the file-level call graph. Bridge nodes sit on the critical path between many other files — chokepoints that propagate change broadly. For graphs > 500 nodes the algorithm samples 100 random sources and rescales (approximate).

  • grasp_bundleAnalyse bundle size contribution per file

    Parse a webpack/rollup/esbuild stats.json and map bundle sizes onto the files in a Grasp session. Returns per-file bundle size sorted largest-first. Helps identify which files contribute most to final bundle weight.

  • grasp_change_riskChange Risk Scorerread-only

    Given a list of changed files (e.g. from a PR diff), returns a composite risk score 0–100 with per-component breakdown. Designed for agent decision-making: if risk > 70, require second reviewer. Formula: risk = blast_radius×0.35 + complexity×0.25 + churn_frequency×0.20 + layer_violations×0.20 Score ≤ 33 = low, 34–66 = medium, 67+ = high. Parameters: session_id: string — active analysis session changed_files: string[] — list of file paths that changed Returns: { score: number, level: "low"|"medium"|"high", components: {blastRadius, complexity, churnFrequency, layerViolations}, affected…

  • grasp_ci_statusGitHub Actions CI status for a reporead-only

    Returns the latest GitHub Actions workflow run status for a repo — whether CI is passing, failing, or in progress. Use to check build health alongside grasp_analyze or grasp_commits.

  • grasp_commitsGitHub commit activity for a reporead-only

    Returns commit counts for the last 7 days and 30 days for a GitHub repo, plus commits since a given timestamp (useful for tracking how many commits landed since your last Grasp analysis). Use alongside grasp_analyze to detect when a repo has changed.

  • grasp_communitiesLeiden Community Detectionread-only

    Detect cohesive file communities (bounded contexts / microservice candidates) in the codebase using Louvain-style greedy modularity optimization. Returns: - communities: list of {id, label, files, internal_edges, external_edges, cohesion} - modularity_score: Q ∈ [-0.5, 1.0] — higher is more modular - merge_suggestions: small communities that likely belong together Use this to identify microservice split points, bounded contexts, or team ownership boundaries.

  • grasp_confidenceConnection Confidence Scoresread-only

    Compute confidence scores (0.0–1.0) for all cross-file connections in the session. - 1.0: explicit static import + direct call - 0.8: same folder / same module cluster - 0.6: cross-folder, inferred (call count ≥ 3) - 0.4: low-frequency or dynamic-style call Returns connections sorted by confidence descending with aggregate stats. Use min_confidence to filter low-signal edges from downstream tools.

  • grasp_config_check

    Run grasp.yml architecture rules against a session — returns violations with severity and file

  • grasp_contextFile Contextread-only

    Get architectural context for a file from the Grasp brain: health grade, complexity, coupling, churn, dependents, dependencies, and security issues.

  • grasp_contractsMulti-Repo Contract Analysisread-only

    Analyse contracts between a provider repo and one or more consumer repos. The provider's exported functions define the contract. Each consumer session is checked to verify it only calls functions that exist in the provider's exports. Returns: - contracts: list of exported functions in the provider with usage counts across consumers - violations: consumer calls to functions NOT in the provider's exports (broken contracts) - coverage_pct: % of provider contract used by consumers - orphaned: exported provider functions used by nobody Requires two or more grasp_analyze sessions — one for the pr…

  • grasp_contributorsTeam contributor ownership per file

    Show which team members own the most code, identify bus-factor files (single contributor), and reveal team silos. Uses git history from a local repo. Returns per-contributor stats and files with single-author risk.

  • grasp_coverageOverlay test coverage on analysis

    Parse a coverage file (lcov.info or Istanbul/NYC coverage-final.json) and return per-file coverage percentages mapped against files in a Grasp session. Use after grasp_analyze to get a combined "coverage + hotspot" view. Files with high churn AND low coverage are your riskiest files.

  • grasp_coverage_gapsTest Coverage Gap Mapread-only

    Identifies functions with no test coverage using COVERS graph edges. Returns uncovered functions sorted by call frequency (most-called untested first), risky uncovered functions in high-churn files, per-directory coverage percentages, and an overall coverage estimate. Requires grasp_analyze to have been run first.

  • grasp_cross_repoCross-repo / monorepo comparisonread-only

    Compares two analyzed sessions to find shared patterns, naming clashes, duplicated logic, and suggests shared library extractions. Also reports workspace sub-packages for monorepos.

  • grasp_cyclesFind Circular Dependenciesread-only

    Find all circular dependency chains in the codebase. Circular deps cause tight coupling, make testing difficult, and can cause runtime errors. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - limit (number, optional): Max cycles to return (default: 20) Returns: { "total": number, "cycles": [ { "length": number, // Number of files in the cycle "files": string[], // Files in the cycle (A → B → C → A) "display": string // Human-readable: "a.py → b.py → c.py → a.py" } ] …

  • grasp_db_couplingAnalyze database schema coupling (ORM models, raw SQL, queries)read-only

    Scans source files for ORM model definitions (SQLAlchemy, TypeORM, Sequelize, Prisma, Drizzle, Mongoose) and raw SQL/query patterns to produce a file-to-table coupling report. Identifies god tables (touched by many files), high-coupling files (touch many tables), and shared-table clusters that indicate tight coupling. Use after grasp_analyze.

  • grasp_dead_packagesList npm packages declared but never importedread-only

    Returns packages found in package.json dependencies/devDependencies that are not imported by any code file. Useful for pruning bloat from node_modules. Use after grasp_analyze on a Node.js project.

  • grasp_dep_impactDependency update impact analysis

    Find all files that import a given npm/pip/go package and show the blast radius of upgrading or removing it. Scans file content for import/require/from statements matching the package name. Returns affected files sorted by churn (riskiest changes first), plus the transitive blast radius.

  • grasp_dependentsGet File Dependentsread-only

    Get all files that depend on a specific file (incoming dependencies — what calls into it). Useful for blast radius analysis: "what breaks if I change this file?" Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - file_path (string): Relative path to the file Returns: { "file": string, "depended_on_by": [ // Files that call into this file { "file": string, "functions_used": string[], "call_count": number } ], "blast_radius": number, // Count of dependent files "total": numbe…

  • grasp_deps_devEcosystem Dependents (deps.dev)read-only

    Query deps.dev for how many public packages in the ecosystem depend on this repo/package. Shows dependent count across npm/PyPI/Go/Maven.

  • grasp_detect_changesDetect Changed Symbolsread-only

    Maps git diff output to affected symbols and execution processes. Given a local repo path and scope, runs git diff, extracts changed line ranges, and cross-references them with the indexed function table in the Grasp brain store. scope options: - unstaged: git diff (working tree vs index) - staged: git diff --cached (index vs HEAD) - all: git diff HEAD (all uncommitted changes) - compare: git diff {base_ref}...HEAD (branch comparison) Returns: changed files, affected symbols (with file+line), affected processes (BFS-traced from entry points), and a risk level (LOW/MEDIUM/HIGH/CRITICAL).

  • grasp_diagramArchitecture Diagram Generatorread-only

    Generates architecture diagrams from analysis data. Output pastes directly into GitHub wikis, Notion, Confluence. Formats: mermaid (default) | c4-context | c4-container | c4-component Parameters: session_id: string format: "mermaid"|"c4-context"|"c4-container"|"c4-component" (default "mermaid") layer: string (only for c4-component) max_nodes: number (default 50) Returns: { diagram: string, format: string, nodeCount: number, tip: string }

  • grasp_diffDiff Two Analysis Sessionsread-only

    Compare two analysis sessions to see what changed between them — files added/removed, health score delta, new/resolved issues, dependency count change, and new circular dependencies. Parameters: session_id_a — the baseline session (older snapshot) session_id_b — the comparison session (newer snapshot) Returns a structured diff report.

  • grasp_diff_snapshotsCompare Architecture Snapshotsread-only

    Compares two architecture snapshots saved via grasp_snapshot and reports drift. Returns health score delta, new circular dependencies, files with significantly increased coupling, and a drift_level of STABLE | DEGRADED | CRITICAL. Use in CI to gate merges on architectural quality.

  • grasp_diff_symbolsDiff → Symbol Mappingread-only

    Parse a unified git diff and map changed line ranges to function/class definitions in the analysed codebase. Returns: - changed_symbols: list of functions/classes touched by the diff, with file, line, and caller count - blast_radius_total: sum of unique files that depend on any changed symbol - diff_files: list of source files mentioned in the diff Pipe `git diff HEAD~1` (or any unified diff) into the `diff` parameter.

  • grasp_doraDORA Metricsread-only

    Estimate DORA metrics (Deployment Frequency, Lead Time, Change Failure Rate, MTTR) from GitHub API data

  • grasp_dutiesSeparation of Duties Validatorread-only

    Scans the codebase for separation-of-duties violations — cases where the same file or module both initiates a transaction/action AND approves/validates it. Critical for SOX, FDA 21 CFR Part 11, and security-sensitive systems. Args: - session_id: analysis session - initiation_patterns: regex patterns identifying "initiate" code (optional, defaults to common financial/command patterns) - approval_patterns: regex patterns identifying "approve/validate" code (optional, defaults to common approval patterns)

  • grasp_ecssECSS-E-ST-40C Compliance Checkerread-only

    Check ESA software engineering standard ECSS-E-ST-40C compliance. Verifiable rules: DI-01 (unique IDs in file headers), DI-04 (documented interfaces), DI-07 (test coverage), DI-10 (no circular deps), DI-15 (no dead code).

  • grasp_embedGenerate shareable embed code for a reporead-only

    Generates iframe embed code, a README badge, and a direct shareable link for any public GitHub repository so it can be visualized via Grasp without installation.

  • grasp_env_varsEnvironment Variable Scannerread-only

    Scans all files for environment variable reads. Cross-references with .env.example to find undocumented vars. Tags each var with which architectural layer reads it and whether it appears only in test files. Parameters: session_id: string — active analysis session Returns: { vars: [{name, files, layers, inEnvExample, testOnly}], undocumented: string[], testOnly: string[] }

  • grasp_eval_coverageEval Coverage Mapread-only

    Trace which codebase files are reached by eval/test scripts and identify safety-critical files with no eval coverage

  • grasp_eventsEvent Pub/Sub Mapperread-only

    Maps event emitters and subscribers across the codebase. Builds a pub/sub dependency graph that import analysis cannot see. Detects orphaned events (emitted, never subscribed) and ghost subscribers (subscribed, never emitted). Patterns detected: Node.js EventEmitter, browser addEventListener/dispatchEvent, Redux dispatch, pub/sub libraries. Parameters: session_id: string — active analysis session Returns: { events: [{name, emitters, subscribers, orphaned, ghost}], orphanedCount, ghostCount }

  • grasp_exec_flowExecution Flow Tracerread-only

    Trace execution flow from a named entry-point function through the call graph using BFS, labelling each hop as a STEP_IN_PROCESS edge. Returns: - steps: ordered list of {step, function, file, called_by} — the execution chain - mermaid: a Mermaid flowchart LR diagram of the traced path - edge_count: total STEP_IN_PROCESS edges found Use this to understand what a function triggers end-to-end, ideal for onboarding and PR review.

  • grasp_explainExplain a file or function

    Generate a plain-English structural explanation for a file or function in the analysed codebase. Describes the file's role, layer, dependencies, complexity, and top functions, or explains a specific function's purpose based on its name and call graph.

  • grasp_export_csvExport graph as CSV bundleread-only

    Exports the analysis as three CSVs: files (path/layer/language/lines/complexity/churn/fan_in/fan_out/has_security_issue), connections (source/target/count), and issues (type/severity/file/description). The `format` parameter controls which sheet is returned. Default `bundle` returns all three concatenated with `--- <name>.csv ---` separators.

  • grasp_export_cypherExport graph as Cypher (Neo4j)read-only

    Exports the analysis graph as Neo4j CREATE statements: (:File) and (:Function) nodes, (:File)-[:DEFINES]->(:Function) and (:File)-[:IMPORTS]->(:File) relationships. Paste into Neo4j Browser or pipe to cypher-shell.

  • grasp_export_d2Export graph as D2read-only

    Exports the dependency graph as a Terrastruct D2 diagram with `direction: right`, layer containers, and import edges. Render with the `d2` CLI to SVG / PNG / PDF.

  • grasp_export_dgmlExport graph as DGML (Visual Studio)read-only

    Exports the dependency graph as a Visual Studio Directed Graph (DGML) XML document. Opens natively in the Visual Studio Architecture window and is consumable by other Microsoft architecture tools.

  • grasp_export_dotExport graph as Graphviz DOTread-only

    Exports the dependency graph as a Graphviz `digraph` (DOT). Files are clustered into `subgraph cluster_<layer>` blocks, layer-coloured nodes carry path + LOC labels, and edges are labelled with import counts when > 1. Render with `dot -Tsvg` / `dot -Tpng` or paste directly into GitHub which renders DOT inline.

  • grasp_export_drawioExport graph as draw.io / diagrams.net XMLread-only

    Exports the dependency graph as a draw.io (`.drawio`) XML document with a simple grid layout (one column per layer). Open and edit in https://app.diagrams.net or the VS Code draw.io extension.

  • grasp_export_gexfExport graph as GEXF (Gephi)read-only

    Exports the dependency graph as a GEXF 1.3 document — Gephi's native format. Carries node attributes (layer, lines, complexity, churn) and weighted edges. Richer than GraphML for Gephi-based analysis.

  • grasp_export_graphmlExport graph as GraphMLread-only

    Exports the analysis graph as a GraphML XML document compatible with yEd, Gephi, Cytoscape and similar tools. Nodes carry label/layer/language/lines attributes; edges carry edgeType="imports".

  • grasp_export_mermaidExport graph as Mermaidread-only

    Exports the dependency graph as a Mermaid `graph LR` document with one subgraph per layer. Renders inline on GitHub, GitLab, Notion, Obsidian, and most modern markdown viewers.

  • grasp_export_obsidianExport graph as Obsidian Canvasread-only

    Exports the analysis graph as an Obsidian .canvas JSON document. Files are grouped by layer into vertical columns; layer-coloured nodes are connected by import edges. Save the output as <name>.canvas inside an Obsidian vault to open it.

  • grasp_export_plantumlExport graph as PlantUMLread-only

    Exports the dependency graph as a PlantUML class diagram (`@startuml ... @enduml`) with one `package` per layer and `-->` edges for imports. Compatible with Confluence, Jira, IntelliJ, and the PlantUML server.

  • grasp_feature_flagsFeature Flag Trackerread-only

    Finds all feature flag reads in the codebase. Supports LaunchDarkly, GrowthBook, OpenFeature, env-var flags (FEATURE_X, FF_X, ENABLE_X), and custom patterns (flags.get, features.enabled, isFeatureEnabled). Parameters: session_id: string — active analysis session Returns: { flags: [{name, source, files}], totalFlags: number }

  • grasp_file_depsGet File Dependenciesread-only

    Get all files that a specific file depends on (outgoing dependencies — what it calls into). Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - file_path (string): Relative path to the file (e.g. "src/auth.py", "lib/utils.ts") Returns: { "file": string, "depends_on": [ // Files this file calls into { "file": string, "functions_called": string[], "call_count": number } ], "total": number }

  • grasp_find_pathFind Dependency Pathread-only

    Find the shortest dependency path between two files. Useful for understanding how file A connects to file B through the call graph. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - from (string): Source file path - to (string): Target file path Returns: { "from": string, "to": string, "path": string[], // Files in the dependency chain "length": number, // Hops in the chain "found": boolean }

  • grasp_fork_diffFork Divergence Analysisread-only

    Compare a fork session against its upstream session. Shows diverged files, identical files, fork-only files, and the blast radius of merging upstream back.

  • grasp_generate_agents_mdGenerate AGENTS.md

    Generate an AGENTS.md file for the repo with architecture context: health grade, critical issues, functional areas, and grasp usage instructions. Write to the repo root or a custom output_path. Returns the path written.

  • grasp_generate_skillsGenerate Claude Skills

    Generate per-functional-area skill files under .claude/skills/generated/ in the repo root. Each file documents the files, exported API, and dependencies of one functional area (top-level folder). Returns list of files written. These skill files can be used by Claude Code (via the Skill tool) to give focused context when navigating each module.

  • grasp_good_first_issuesGood First Issue Generatorread-only

    Identify ideal first-contribution targets: isolated files (fan-in ≤ 2), low complexity (< 10 functions), no test counterpart, stable (not in active churn). Returns ranked suggestions with GitHub issue draft text.

  • grasp_graph_schemaGraph Schema Inspectorread-only

    Returns the Kuzu graph schema for the indexed repo: all node table names, edge table names, their fields, and row counts. Use to understand what Cypher queries are possible via grasp_graph_query.

  • grasp_group_addAdd Repo to Group

    Add a repository to a named group for multi-repo fan-out queries. Groups are stored in ~/.grasp/groups.json. Once added, use @groupName as the source in grasp_search, grasp_ask, grasp_context, and grasp_route_map to query all repos in the group at once. Args: - group: group name (e.g. "backend-services", "platform") - source: repo source string (must already be brain-indexed)

  • grasp_group_listList Repo Groupsread-only

    List all named repo groups and their members. Groups are stored in ~/.grasp/groups.json and created via grasp_group_add.

  • grasp_heritageHeritage Software Genealogyread-only

    Overlay heritage manifest (which files came from prior missions/versions) on the codebase. Returns heritage coverage %, delta complexity, and files with zero delta (reuse candidates for certification shortcut).

  • grasp_hooksClaude Code + Cursor Hooks Generatorread-only

    Generate ready-to-use AI tool configuration files from the analysed codebase. Outputs: - claude_settings_json: .claude/settings.json with a PostToolUse hook that warns when edits touch critical files - cursor_mdc: .cursor/rules/grasp.mdc with layer constraints and critical file annotations - claudemd_snippet: paste into CLAUDE.md to inject architecture context into every session The hook warns the AI when it edits a high-fan-in file, prompting it to check downstream callers.

  • grasp_hotspotsGet Hotspot Filesread-only

    Get the most problematic files ranked by a combination of coupling, complexity, and size. These are the highest-risk files to change and best candidates for refactoring. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - limit (number, optional): Number of files to return (default: 15) - sort_by ("coupling" | "complexity" | "size" | "combined"): Ranking strategy (default: "combined") Returns: { "hotspots": [ { "path": string, "name": string, "layer": string, "fan_in": number, // Files that depen…

  • grasp_hub_nodesHub nodes — degree centralityread-only

    Ranks files by total connectivity (fan-in + fan-out). Top hubs are the most coupled files in the codebase — likely god-objects or core abstractions.

  • grasp_icdInterface Control Document Mapperread-only

    Match ICD (Interface Control Document) entries to code functions. Flags unimplemented interfaces (ICD entry with no matching function) and undocumented interfaces (function with no ICD entry).

  • grasp_ingestIngest into Knowledge Graph

    Ingest any artifact — a file, a directory, or a URL — into Grasp's semantic knowledge graph. Handles code, Markdown/text, PDF, Word (.docx), Excel (.xlsx), HTML, images (OCR), audio/video (local Whisper transcription), and YouTube links. Entities and relationships are extracted (tagged EXTRACTED vs INFERRED) and stored for querying with grasp_ask. Uses a configured LLM when available, otherwise a deterministic local extractor. Optional parsers (pdf-parse, mammoth, xlsx, tesseract.js) install on demand.

  • grasp_irqIRQ / Interrupt Dependency Graphread-only

    Detect interrupt handler patterns and trace their call chains. Flags: dynamic allocation (malloc/new) in IRQ chain, sleeping calls in IRQ chain, excessive call depth from interrupt context.

  • grasp_issuesOverlay GitHub Issues on codebase files

    Fetch open GitHub Issues for a repo and map them to files in a Grasp session. Files mentioned most in issues are your "business pain hotspots". Requires a GitHub token for private repos or to avoid rate limits.

  • grasp_jira_issues

    Map Jira issues to source files — finds which files are referenced in issue titles and descriptions

  • grasp_kconfigKconfig / Build-Time Conditional Analysisread-only

    Parse Kconfig files and #ifdef CONFIG_* patterns in C files. Maps config options to conditionally compiled files. Detects high-risk toggles (affecting >50 files) and dead code under specific configs.

  • grasp_kg_askAsk the Knowledge Graphread-only

    Ask a natural-language question answered from the ingested knowledge graph, grounded with citations. Uses hybrid lexical+vector retrieval plus graph facts; synthesizes prose with a configured LLM, or returns a sourced digest when none is set.

  • grasp_kg_explainExplain a Conceptread-only

    Explain a concept/entity from the knowledge graph: its type, its graph neighbourhood (relationships, tagged EXTRACTED/INFERRED), and the sources where it appears.

  • grasp_kg_exportExport Knowledge Graphread-only

    Export the semantic knowledge graph to a portable format: cypher (Neo4j/FalkorDB), graphml (Gephi/yEd), json, or mermaid (diagram). Optionally write to a file path.

  • grasp_kg_statsKnowledge-Graph Statsread-only

    Summarise the knowledge graph: document/chunk/entity/relationship counts, EXTRACTED vs INFERRED split, and the most-connected entities ("god nodes").

  • grasp_kg_traceTrace Knowledge-Graph Pathread-only

    Trace the shortest relationship path between two concepts/entities in the knowledge graph.

  • grasp_knowledge_gapsKnowledge gaps — isolated, untested, weakly clusteredread-only

    Surfaces three classes of risk: (1) isolated code files (no callers + no callees, likely dead), (2) untested hotspots (high fan-in but no matching test file), (3) weak communities (layers with < 3 files but > 5 outgoing edges).

  • grasp_latencyFinance Latency Hotspot Detectionread-only

    Detects code patterns that introduce latency risk in high-frequency trading or latency-sensitive financial systems — synchronous blocking calls in hot paths, GC-inducing allocations in loops, unnecessary serialization, lock contention patterns. Args: - session_id: analysis session - language: language to scan for (default 'auto' — detected from file extensions) - severity_threshold: filter results by minimum severity: 'all', 'high', 'critical' (default 'all')

  • grasp_licenseDependency License Auditread-only

    Scans node_modules/ for all dependency licenses. Categorizes as permissive (MIT, Apache-2.0, BSD, ISC), copyleft (GPL, AGPL, LGPL), or unknown. Returns violations and summary counts. Parameters: session_id: string — active analysis session flag_copyleft: boolean (default true) allowed_licenses: string[] (optional) — SPDX list of allowed licenses Returns: { dependencies: [{name, version, license, licenseCategory}], summary: {total, permissive, copyleft, unknown}, violations: [{name, license}] }

  • grasp_llm_statusLLM Backend Statusread-only

    List which LLM backends are currently usable (based on environment keys and a local Ollama probe). Diagnostics for the semantic tools.

  • grasp_metricsGet File Metricsread-only

    Get per-file metrics: lines, functions, cyclomatic complexity, fan-in, fan-out, and churn. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - file_path (string, optional): Get metrics for a specific file. If omitted, returns all files sorted by complexity. - limit (number, optional): Max files to return when listing all (default: 30) Returns for specific file: { "path", "lines", "functions", "complexity", "nesting_depth", "fan_in", "fan_out", "churn", "layer" } Returns for all files: { "files": [...], "total": number }

  • grasp_migration_planGenerate ordered migration steps to replace or remove a dependencyread-only

    Analyzes import usage across source files and produces a phased, topologically-ordered migration plan for replacing one package or module with another (or removing it). Returns per-file effort estimates and action items. Use after grasp_analyze.

  • grasp_minimal_contextMinimal context — sub-100 token orientationread-only

    Returns a very compact (~100 token) summary of the repo: name, file count, health grade/score, top languages, top hubs, layers, and circular-dep flag. Designed as the LLM's first call to orient itself before deeper queries.

  • grasp_model_riskFinancial Model Risk Auditread-only

    Audits quantitative financial code for model risk — validates that pricing models, risk calculations, and valuation functions follow best practices: test coverage, parameter validation, numerical stability checks, documentation, and version control patterns. Args: - session_id: analysis session - model_paths: optional list of path prefixes to restrict audit (e.g. ["src/pricing/", "models/"])

  • grasp_mroMethod Resolution Orderread-only

    Compute Method Resolution Order (MRO) for class hierarchies in Python, Ruby, and Java/Kotlin. - Python: C3 linearization (same algorithm as CPython) - Java/Kotlin/Scala: linearization following single-inheritance chain + interfaces - Ruby: include/prepend order Returns per-class MRO chains and flags methods overridden at multiple levels. Useful for understanding polymorphism, debugging unexpected method dispatch, and refactoring class trees.

  • grasp_multilangMulti-Language Call Graphread-only

    Detect cross-language call boundaries: Ada pragma Import/Export to C, Python ctypes/cffi calling C, JavaScript calling Rust/WASM. Renders cross-language edges and flags safety gaps where rules may not be caught across the boundary.

  • grasp_onboardOnboarding Reading Pathread-only

    Produces an ordered reading path for a new engineer entering a specific area of the codebase. Given a topic/area query, returns 5–15 files sorted by "must understand first" order (low architectural layer + high fan-in = read first). Parameters: session_id: string — active analysis session query: string — area to explore (e.g. "auth", "payments", "src/services/user.ts") limit: number (default 12) — max files to return Returns: { path: [{file, layer, fanIn, whyFirst, connectsTo}], topic: string, totalMatched: number }

  • grasp_org_graphOrg-Level Multi-Repo Dependency Graphread-only

    Merge multiple analysis sessions into a single org-level graph. One node per repo, edges = inter-repo package dependencies detected by matching package.json names across sessions. Use after running grasp_analyze on 2+ repos. Args: - session_ids: array of 2+ session IDs to merge - include_shared_libs: include shared library nodes used by 3+ repos (default true)

  • grasp_org_summaryOrganization Health Summaryread-only

    Analyzes all public repositories in a GitHub org and returns a rolled-up health dashboard. Fetches up to max_repos repos (sorted by stars), analyzes each in parallel, and aggregates health grades, security counts, language distribution, and top churn files.

  • grasp_orm_mapORM Query Mapread-only

    Detects ORM query patterns (Prisma, TypeORM, Sequelize, SQLAlchemy) across the codebase and returns all database operations grouped by model. Shows which functions query which models, operation types, and call frequencies. Use to understand data access patterns, audit database usage, find N+1 risks, or plan schema migrations.

  • grasp_patch_impactPatch Series Impact Analyzerread-only

    Given an ordered list of commit SHAs, rank patches by blast radius and subsystem crossings. Helps kernel/OS reviewers prioritize which patches in a series need most attention.

  • grasp_patternsGet Design Patternsread-only

    Get design patterns detected in the codebase: Singleton, Factory, Observer, hooks, decorators, middleware, and anti-patterns like God Objects. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - include_anti_patterns (boolean, optional): Include anti-patterns like God Object and Long File (default: true) Returns: { "total": number, "patterns": [ { "name": string, "desc": string, "severity": string, "is_anti_pattern": boolean, "file_count": number, "files": [{"name": string, "path": st…

  • grasp_perfPerformance Anti-Pattern Detectorread-only

    Static analysis for common performance anti-patterns: N+1 ORM queries in loops, synchronous I/O on the event loop, JSON serialization inside loops. Each finding includes file, line, severity, and a fix suggestion. Parameters: session_id: string — active analysis session Returns: { findings: [{file, line, pattern, severity, message, suggestion}], criticalCount, warningCount }

  • grasp_pii_tracePII / Sensitive Data Flow Tracerread-only

    Trace all code paths that touch user-marked PII entry points (personally identifiable information, financial data). BFS through dependents, flags risky patterns: logging, unencrypted storage writes, URL parameters, external API calls. Args: - session_id: analysis session - pii_sources: file paths marked as PII entry points

  • grasp_pluginsPlugin Extension-Point Mapread-only

    Detect plugin extension points (registerPlugin, use(), extend(), addHook() patterns) and map which files expose them vs which files implement plugins. Flags tightly-coupled extension points (fan-in > 10).

  • grasp_pr_commentGenerate a PR comment body from a Grasp analysis sessionread-only

    Generates a formatted GitHub PR comment with health score, grade, key metrics, and changed-file impact. Optionally accepts a list of changed files to show blast radius. Use after grasp_analyze.

  • grasp_pr_reviewInline PR Review Comments

    Posts inline code review comments on a GitHub Pull Request at exact lines with high-severity findings. Posts per-line annotations visible in the PR diff view — like Reviewdog. Only posts for: complexity > min_complexity, circular dependency participant, or security issue. Parameters: session_id: string repo: string — "owner/repo" pr_number: number token: string — GitHub PAT with repo write access min_complexity: number (default 15) dry_run: boolean (default false) — returns comments without posting Returns: { posted: number, skipped: number, comments: [{path, line, body}], dryRu…

  • grasp_refactorRefactor wizard — generate a step-by-step refactor planread-only

    Analyzes a file or function within a session and produces a prioritized, step-by-step refactor plan. Considers complexity, fan-in/out, duplicates, layer violations, and circular deps. Use after grasp_analyze.

  • grasp_reg_impactRegulatory Change Impact Mapperread-only

    Given a regulatory document section (GDPR article, HIPAA rule, SOX control, PCI-DSS requirement) and keywords describing what that regulation requires in code, finds all files that implement or touch that regulatory area and estimates the blast radius of a compliance change. Args: - session_id: analysis session - regulation: human-readable regulation label, e.g. "GDPR Article 17 - Right to Erasure" - keywords: code-level keywords to search for, e.g. ["delete", "erasure", "forget", "remove", "purge", "user_data"] - scope_paths: optional list of path prefixes to restrict the search, e.g…

  • grasp_registry_listRegistry — List All Indexed Reposread-only

    List all repositories indexed in the local Grasp Brain (~/.grasp/brain.db). Returns each repo with: source, health grade, file/function counts, last indexed timestamp, and active session IDs. Use this to get an overview of everything indexed, or to find the session_id for a previously analysed repo without re-running grasp_analyze.

  • grasp_registry_statusRegistry — Status & Healthread-only

    Return the overall health of the Grasp registry: how many repos are indexed, how many have active sessions, total analysis coverage.

  • grasp_renameGraph-Aware Symbol Renamecan change or delete data

    Rename a symbol (function, class, variable) across all files in a brain-indexed repo. Uses the brain store edges to locate every file that references the symbol, then produces a whole-word regex rename. By default returns a dry-run diff. Set apply=true to write changes to disk (local repos only). Args: - source: repo source — must be brain-indexed and local path for apply=true - old_name: exact symbol name to rename - new_name: replacement name - apply: false (default) = dry-run diff only; true = write changes to disk

  • grasp_req_traceRequirement Traceabilityread-only

    Map requirements to source code — shows coverage, uncovered requirements, and unspecified code for DO-178C / ECSS compliance

  • grasp_resolve_receiverReceiver Type Inference (self/this)read-only

    Resolve the concrete class for every class method in the codebase — determining what type `self` (Python) or `this` (JS/Java/Ruby) refers to. Returns: - resolutions: list of {method, class, file, line, language, callers} — the resolved receiver chain - ambiguous: methods defined on multiple classes (diamond inheritance / duck typing) - unresolved: methods that could not be mapped to a class Useful for understanding polymorphism, tracing method dispatch, and refactoring class trees.

  • grasp_reuseSoftware Reuse Assessmentread-only

    Assess whether a candidate module can be safely reused in a target project — produces Red/Amber/Green compatibility matrix across interface, dependencies, security, and architecture

  • grasp_route_mapHTTP Route Mapread-only

    Scan a repo for HTTP route definitions and map each route to its handler function. Supports: Express/Fastify/Hono (JS/TS), FastAPI/Flask (Python), Gin (Go). Returns a table of: METHOD, PATH, handler function name, file, line number. Requires a local-path source or an active session_id.

  • grasp_rules_checkCheck architecture rules against a session

    Evaluate a set of FORBIDDEN dependency rules against a prior analysis session. Reads rules from a .grasprules file in the repo root (if path provided) or accepts inline rules. Returns violations grouped by rule — pipe into CI to enforce architecture boundaries. Rule format: { "from": "utils", "to": "services", "type": "FORBIDDEN", "reason": "..." }

  • grasp_run_diffTraining Run Dependency Diffread-only

    Diff two training run configs (YAML or JSON) and identify which code files are affected by each changed hyperparameter or data pipeline key

  • grasp_runtime_callsOverlay runtime call trace on static dependency graphread-only

    Reads a .grasp-trace.json file produced by the GraspTracer and overlays actual runtime call frequencies and durations onto the static analysis. Returns hot files, hot paths, and a merged edge list. Use after instrumenting your app with the GraspTracer from grasp-mcp-server/runtime-tracer.

  • grasp_safety_traceSafety Constraint Tracerread-only

    Identify ungated output paths — paths from entry points to output files that do not pass through any designated safety gate file

  • grasp_sarifExport analysis results as SARIF 2.1.0 for GitHub Code Scanningread-only

    Serializes a Grasp analysis session to SARIF 2.1.0 JSON format suitable for upload to GitHub Code Scanning via the upload-sarif action. Returns the full SARIF document as a string. Use after grasp_analyze.

  • grasp_sbomSBOM Generatorread-only

    Generate a Software Bill of Materials (CycloneDX or SPDX) from dependency files detected in the analysed repo

  • grasp_searchHybrid Semantic Searchread-only

    Hybrid search over a brain-indexed repo: BM25 full-text + vector semantic search merged with Reciprocal Rank Fusion (k=60). Results include process membership — which execution flows (entry-point → call chain) each function participates in. First call may trigger a one-time model download (~23 MB to ~/.grasp/models/). Subsequent calls are instant. Falls back to BM25-only if model unavailable. Args: - source: repo source string (must be indexed via grasp_brain_index first) - query: natural language or keyword query, e.g. "authentication token validation" - limit: max results to return …

  • grasp_securityGet Security Issuesread-only

    Get security issues found in the codebase: hardcoded secrets, SQL injection risks, insecure patterns, etc. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - severity (string, optional): Filter by severity ("critical", "high", "medium", "low") - limit (number, optional): Max issues to return (default: 30) Returns: { "total": number, "issues": [ { "type": string, "severity": string, "file": string, "desc": string } ] }

  • grasp_semantic_searchSemantic function search (cosine similarity)read-only

    Embeds every function signature in the session and returns the top-k matches by cosine similarity to the query. Falls back to substring keyword search on function names if embeddings are unavailable.

  • grasp_semverSemantic Versioning Enforcerread-only

    Compare two sessions and determine if the version bump in package.json is semantically correct. Breaking changes (removed exports) require at least a minor bump. New exports require at least a minor bump. Fixes only = patch is correct. Verdict: 'ok' | 'underbump' | 'breach' Note: AnalysisResult does not carry a packageVersion field. Versions must be supplied via the session source string or are reported as 'unknown'.

  • grasp_service_graph

    Build a service-level dependency graph from OTEL or custom trace JSON — maps inter-service call volumes

  • grasp_sessionsList Active Sessionsread-only

    List all persisted analysis sessions. Sessions survive server restarts and expire after 7 days (configurable via GRASP_SESSION_TTL env var). Returns: { "sessions": [{ "session_id", "source", "analyzed_at", "last_accessed", "size_kb", "health_grade", "file_count" }], "storage": "~/.grasp/sessions/" }

  • grasp_shape_checkFunction Shape Checkerread-only

    For a given function name, trace how it is called across all files and flag argument count mismatches. Uses the brain store to find the function definition (parameter count) and all call sites. Flags callers that pass a different number of arguments than the definition expects. Requires the repo to be indexed via grasp_brain_index.

  • grasp_similarityDuplicate and semantic similarity analysisread-only

    Deep duplicate and code-clone analysis for a session. Returns duplicate function clusters, most-duplicated files, and refactoring recommendations ranked by impact. Use after grasp_analyze.

  • grasp_skillmdSKILL.md Generatorread-only

    Auto-generate a SKILL.md (or CLAUDE.md snippet) from the analysed codebase. The document covers: - Architecture overview (layers, top folders) - Critical files (highest fan-in) - Exported API surface (top exported functions sorted by caller count) - Detected patterns and anti-patterns - Open issues (critical + warnings) Paste the output directly into SKILL.md, CLAUDE.md, or a system prompt.

  • grasp_snapshotSave Architecture Snapshot

    Saves the current graph state as a named snapshot for later drift comparison via grasp_diff_snapshots. Captures health score, coupling metrics, circular dep count, and per-file coupling. Use before/after significant changes, or in CI to track architectural health over releases.

  • grasp_staleStale File Detectorread-only

    Finds files that are active (imported by others) but potentially abandoned — low churn, high fan-in, no test counterpart. These are the "this probably still works but nobody knows why" files. Staleness score = (low_churn × 0.4) + (high_fanIn × 0.35) + (no_test × 0.25), normalized 0–100. Parameters: session_id: string — active analysis session min_fan_in: number (default 2) — minimum fan-in to consider limit: number (default 20) — max results Returns: { files: [{path, layer, fanIn, churn, hasTest, stalenessScore}] }

  • grasp_subsystemsKernel / OS Subsystem Boundary Mapread-only

    Detect directory-level subsystem groupings in C/C++ repos (networking, fs, mm, drivers, arch, crypto, etc.) and flag cross-subsystem dependencies. Also supports user-defined subsystems via custom boundaries.

  • grasp_suggestRefactoring Suggestionsread-only

    Generate prioritised refactoring suggestions based on hotspot data, metrics, circular dependencies, and issues from a prior analysis session. Parameter: session_id — from grasp_analyze Returns a ranked list of actionable suggestions with rationale and estimated impact.

  • grasp_suggested_questionsSuggested review questionsread-only

    Auto-generates 5–10 thoughtful questions a code reviewer should ask, derived from the session's hubs, bridges, layer crossings, knowledge gaps, circular deps, and duplicates. Use as the opening agenda for an architecture review.

  • grasp_surprising_connectionsSurprising connections — rare cross-layer edgesread-only

    Finds dependencies that cross between architectural layers in unusual combinations. Sorts by rarity (1 - count(layer-pair) / total cross-layer edges). High-rarity edges are the most likely architecture violations.

  • grasp_timelineGit commit timeline for a local reporead-only

    Returns the last N git commits for a local path, with per-commit changed files. Use this to understand how the codebase evolved, spot high-churn periods, and identify which files change together.

  • grasp_tool_mapService Contract Mapread-only

    Scan a repo for MCP tool registrations, gRPC service definitions, and RPC handlers. Returns a structured map of: tool/method name, type (mcp|grpc|rpc), file, line number. Useful for understanding what capabilities a service exposes, and for generating documentation. Requires a session_id or local source path.

  • grasp_traverseTraverse graph with token budgetread-only

    Walks the file/function call graph from a start node, BFS by edges. Stops when accumulated token estimate >= max_tokens or depth >= max_depth. Direction = callers (fan-in), callees (fan-out), imports, or both.

  • grasp_type_propagationCross-File Type Propagationread-only

    Runs topological cross-file type inference on the session. Processes files in import-dependency order (Kahn's algorithm) and propagates known return types across call boundaries. Returns inferred types with confidence scores. Use to understand what types flow across module boundaries — helpful for refactoring return types or understanding data shapes without running the code.

  • grasp_typesType Annotation Coverageread-only

    Reports type annotation coverage per file — percentage of functions with type annotations. For TypeScript/TSX files: checks for type annotations in function signatures. Prioritizes high fan-in files (annotating them has the most downstream impact). Parameters: session_id: string — active analysis session min_fan_in: number (default 1) limit: number (default 20) — max files (sorted by lowest coverage first) Returns: { files: [{path, layer, fanIn, typedFunctions, totalFunctions, coveragePct}], averageCoverage: number }

  • grasp_unusedGet Unused Functions (Dead Code)read-only

    Get functions that appear to be dead code — exported or defined but never called from other files. Requires a session_id from grasp_analyze. Args: - session_id (string): From grasp_analyze - file (string, optional): Filter to functions in a specific file path - limit (number, optional): Max results to return (default: 50) Returns: { "total": number, "dead_code_pct": number, "functions": [ { "name": string, "file": string, "line": number | null } ] }

  • grasp_vuln_watchScheduled Vulnerability Monitor

    Start/stop/status scheduled vulnerability re-scans. Persists scan history in brain.db and surfaces new CVEs since last scan. Actions: start (begin periodic scanning), stop (cancel watch), status (list active watches), history (past scan results for a repo).

  • grasp_vulnerabilitiesDependency & Container Security Scannerread-only

    Full security scan: (1) declared dependencies vs OSV.dev CVEs, (2) container/runtime images vs NIST NVD, (3) supply-chain integrity checks (lockfile hashes), (4) Socket.dev behavioral analysis for npm. Returns severity-classified findings with fix guidance.

  • grasp_watchWatch a directory for changes

    Analyse a local directory and return a diff summary compared to the last time it was analysed. Call repeatedly to detect changes: new files, removed files, health score drift, new issues. Uses session IDs to compare across calls. First call returns baseline; subsequent calls return the diff.

  • grasp_wikiAuto-Generated Repository Wikiread-only

    Generate a complete markdown wiki for the repository from the analysis session. Produces: - index.md: overview, health grade, layers, critical files, top exported API - One page per top-level folder: files, key functions, fan-in - api.md: all exported functions sorted by caller count Paste into GitHub Wiki, Notion, Confluence, or .github/wiki/.

  • type_propagationType Propagationread-only

    Trace where a return type flows through the codebase. Finds producer functions (those that return the type) and peer functions (those sharing the same return type) within N hops. Requires grasp_brain_index to have been run first. Example: type_propagation with typeName="Promise<User>" finds all functions returning Promise<User> and their call neighbors.

Signals

Stars
30
Forks
3
Open issues
0
Last commit (this folder)
Jul 16, 2026 (3 months ago)
Last release
Sep 7, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Registry name
io.github.ashfordeOU/grasp
Version
3.21.0
Auth
No auth
Packages
npm grasp-mcp-server
License
License unknown
First seen
Oct 24, 2026
Last checked
Oct 25, 2026

More from ashfordeOU

Cite this page

Grasp — Code Architecture & Dependency Analysis MCP server. Agent Mart. https://agentmart.dev/connectors/ashfordeou-grasp (last updated 2026-10-25)