Core Tools 3 tools · ~145 tok

All 126 tools are auto-approved and available to Kiro once installed. The MCP server is started by Kiro automatically when needed.

kirograph_context

PRIMARY TOOL: Build comprehensive context for a task or feature request. Returns entry points, related symbols, and key code — often enough to understand the codebase without additional tool calls.

ParameterTypeDefaultDescription
taskstringrequiredTask, bug, or feature description
maxNodesnumber20Max symbols to include
detailstringfullCode verbosity: full (complete source), signatures (signature + docstring, ~70% fewer tokens), summary (locations only, no code)
includeCodebooleantrueInclude code snippets — deprecated, prefer detail
projectPathstringcwdProject root path

kirograph_node

Get details about a specific symbol: kind, name, qualified name, file location, signature, docstring, and optionally source code.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
detailstringsummaryCode detail level: summary (name + location + qualified name), signatures (+ signature + docstring), full (+ complete source code)
includeCodebooleanfalseInclude full source code — deprecated, prefer detail: "full"
projectPathstringcwdProject root path

kirograph_status requires enableNavigation

Check index health and statistics: files indexed, symbol count, edge count, breakdown by kind and language, frameworks detected, database size, semantic search status, and sync state.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_files requires enableNavigation

List the indexed file structure with filtering and format options.

ParameterTypeDefaultDescription
filterPathstring-Filter by directory prefix (e.g., src/)
patternstring-Filter by glob pattern (e.g., **/*.ts)
maxDepthnumber-Limit tree depth
formatstringtreetree, flat, or grouped
includeMetadatabooleantrueInclude language and symbol counts
projectPathstringcwdProject root path

kirograph_impact requires enableNavigation

Analyze what code would be affected by changing a symbol. Use before making changes. BFS traversal of all incoming edges.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
depthnumber2Traversal depth
projectPathstringcwdProject root path

Call Sites trackCallSites 2 tools · ~84 tok

kirograph_callers

Find all functions/methods that call a specific symbol. BFS traversal of incoming call edges.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
limitnumber20Max results (1–100)
projectPathstringcwdProject root path

kirograph_callees

Find all functions/methods that a specific symbol calls. BFS traversal of outgoing call edges.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
limitnumber20Max results (1–100)
projectPathstringcwdProject root path

Code Health enableCodeHealth 25 tools · ~935 tok

kirograph_dead_code

Find symbols with no incoming references (potential dead code). Only unexported symbols are considered.

ParameterTypeDefaultDescription
limitnumber50Max results (1–100)
projectPathstringcwdProject root path

kirograph_circular_deps

Find circular import dependencies using Tarjan's strongly connected components algorithm over import edges.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_hotspots

Find the most-connected symbols by total edge degree (incoming + outgoing). Excludes structural contains edges.

ParameterTypeDefaultDescription
limitnumber20Max results (1–100)
projectPathstringcwdProject root path

kirograph_surprising

Find non-obvious cross-file connections scored by path distance × edge-kind weight. The most unexpected coupling in your codebase.

ParameterTypeDefaultDescription
limitnumber20Max results (1–100)
projectPathstringcwdProject root path

kirograph_diff

Compare the current graph state against a saved snapshot. Shows added/removed symbols and edges.

ParameterTypeDefaultDescription
snapshotstringlatestSnapshot label. Omit to use the most recent saved snapshot.
projectPathstringcwdProject root path

kirograph_type_hierarchy

Traverse the type hierarchy of a class or interface. Recursive traversal of extends/implements edges.

ParameterTypeDefaultDescription
symbolstringrequiredClass or interface name
directionstringbothup (base types), down (derived types), both
projectPathstringcwdProject root path

kirograph_snapshot_save

Save a snapshot of the current graph state.

ParameterTypeDefaultDescription
labelstring-Snapshot label
projectPathstringcwdProject root path

kirograph_snapshot_list

List all saved graph snapshots.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_path

Find shortest path between two symbols.

ParameterTypeDefaultDescription
fromstringrequiredSource symbol name
tostringrequiredTarget symbol name
projectPathstringcwdProject root path

kirograph_affected

Find test files affected by changes to a symbol.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
projectPathstringcwdProject root path

kirograph_module_api

List all exported symbols in a file or directory.

ParameterTypeDefaultDescription
pathstring-File or directory path to inspect
limitnumber50Max results
projectPathstringcwdProject root path

kirograph_rename_preview

Show all reference sites for a symbol before renaming.

ParameterTypeDefaultDescription
symbolstringrequiredSymbol name
limitnumber50Max results
projectPathstringcwdProject root path

kirograph_doc_coverage

Find exported symbols missing docstrings.

ParameterTypeDefaultDescription
pathstring-Filter by file/directory
limitnumber50Max results
projectPathstringcwdProject root path

kirograph_god_class

Classes ranked by member count.

ParameterTypeDefaultDescription
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_inheritance_depth

Find deepest inheritance chains via BFS.

ParameterTypeDefaultDescription
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_recursion

Find recursive and mutually-recursive functions.

ParameterTypeDefaultDescription
limitnumber30Max results
projectPathstringcwdProject root path

kirograph_largest

Symbols ranked by lines of code.

ParameterTypeDefaultDescription
limitnumber20Max results
kindstring-Filter by symbol kind
projectPathstringcwdProject root path

kirograph_rank

Symbols ranked by fan-in or fan-out edge count.

ParameterTypeDefaultDescription
bystringfan-infan-in or fan-out
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_distribution

Symbol-kind breakdown per file or directory.

ParameterTypeDefaultDescription
pathstring-Filter by directory
limitnumber30Max results
projectPathstringcwdProject root path

kirograph_annotations

Decorator/attribute histogram across the codebase.

ParameterTypeDefaultDescription
decoratorstring-Filter by decorator name
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_session_start

Save current graph state as session baseline for tracking changes.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_session_end

Show what changed since the session baseline.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_unused_imports

Find import nodes with zero resolved downstream edges.

ParameterTypeDefaultDescription
limitnumber50Max results
projectPathstringcwdProject root path

kirograph_gini

Gini inequality coefficient (0=equal, 1=total inequality) on LOC, fan-in, or fan-out.

ParameterTypeDefaultDescription
metricstringlocloc, fan-in, or fan-out
projectPathstringcwdProject root path

kirograph_dependency_depth

Longest import chains via Kahn topological sort.

ParameterTypeDefaultDescription
limitnumber20Max results
projectPathstringcwdProject root path

Architecture enableArchitecture 5 tools · ~205 tok

kirograph_architecture requires enableArchitecture

Get the full architecture overview: detected packages, layers, and the dependency graph between them.

ParameterTypeDefaultDescription
levelstringbothpackages, layers, or both
includeFilesbooleanfalseInclude per-file package/layer assignments
projectPathstringcwdProject root path

kirograph_coupling requires enableArchitecture

Get coupling metrics for all packages or a specific one: Ca (afferent), Ce (efferent), instability (Ce / (Ca + Ce)).

ParameterTypeDefaultDescription
sortBystringinstabilitySort: instability, afferent, efferent
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_package requires enableArchitecture

Inspect the files and dependencies of a specific package.

ParameterTypeDefaultDescription
packagestringrequiredPackage name or path (partial match accepted)
includeFilesbooleantrueList files in the package
projectPathstringcwdProject root path

kirograph_communities requires enableArchitecture

Detect code communities using the Leiden algorithm.

ParameterTypeDefaultDescription
resolutionnumber1.0Resolution parameter — higher values = smaller communities
limitnumber15Max results
projectPathstringcwdProject root path

kirograph_manifest requires enableArchitecture

Workspace manifest summary: all packages with versions, dependencies, and licenses. Pass package to drill in, ecosystem to filter, showDrift for version conflicts.

ParameterTypeDefaultDescription
packagestring-Drill into a specific package
ecosystemstring-e.g. npm, cargo, go, python
showDriftbooleanfalseSurface packages with conflicting versions
projectPathstringcwdProject root path

Complexity enableComplexity 5 tools · ~660 tok

kirograph_complexity requires enableComplexity

Rank functions by cyclomatic complexity, cognitive complexity, and maintainability index. Flags symbols exceeding threshold.

ParameterTypeDefaultDescription
limitnumber20Max results
sortBystringcyclomaticcyclomatic, cognitive, or maintainability
thresholdnumber-Only show symbols above this value
projectPathstringcwdProject root path

kirograph_simplify_scan requires enableComplexity

Quality scan of the codebase: finds simplification candidates by complexity, dead code, and LOC thresholds.

ParameterTypeDefaultDescription
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_health requires enableComplexity

Composite 0–10000 graph health score across complexity, dead code, coupling, and circular dependencies.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_dsm requires enableComplexity

Design Structure Matrix — dependency matrix between top-level modules.

ParameterTypeDefaultDescription
limitnumber15Max modules to include
projectPathstringcwdProject root path

kirograph_test_risk requires enableComplexity

Risk-ranked functions: complexity × fan-in. Highest risk = most likely to break.

ParameterTypeDefaultDescription
limitnumber20Max results
thresholdnumber-Minimum risk score to include
projectPathstringcwdProject root path

Git Context enableGitContext 7 tools · ~410 tok

kirograph_flows requires enableGitContext

Trace execution flows between symbols using call edges.

ParameterTypeDefaultDescription
fromstringrequiredSource symbol name
tostring-Target symbol name
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_diff_context requires enableGitContext

Changed symbols (unstaged or staged) with callers/callees and affected tests.

ParameterTypeDefaultDescription
stagedbooleanfalseUse staged changes only
refstring-Compare against git ref
projectPathstringcwdProject root path

kirograph_commit_context requires enableGitContext

Structured summary of staged changes, ready for a commit message.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_pr_context requires enableGitContext

Semantic diff between two git refs for PR descriptions.

ParameterTypeDefaultDescription
basestringrequiredBase git ref
headstringHEADTarget ref
projectPathstringcwdProject root path

kirograph_changelog requires enableGitContext

Human-readable semantic diff between two refs.

ParameterTypeDefaultDescription
ref1stringrequiredFirst git ref
ref2stringrequiredSecond git ref
projectPathstringcwdProject root path

kirograph_test_map requires enableGitContext

Map symbols to test files; detect uncovered symbols.

ParameterTypeDefaultDescription
symbolstring-Focus on a specific symbol
limitnumber20Max results
projectPathstringcwdProject root path

kirograph_test_coverage requires enableGitContext

Parse lcov/Istanbul/Cobertura coverage files → per-file coverage %, sorted worst-first.

ParameterTypeDefaultDescription
sortBystringascSort order: asc (worst first) or desc (best first)
limitnumber30Max results
projectPathstringcwdProject root path

Edit Primitives enableEditPrimitives 5 tools · ~280 tok

kirograph_refactor requires enableEditPrimitives

Structured search-and-replace across the graph.

ParameterTypeDefaultDescription
patternstringrequiredSearch pattern
replacementstringrequiredReplacement string
dryRunbooleantruePreview changes without applying
projectPathstringcwdProject root path

kirograph_str_replace requires enableEditPrimitives

Replace a unique string anchor in a file; fails on 0 or >1 matches.

ParameterTypeDefaultDescription
filestringrequiredFile path
old_strstringrequiredString to replace (must be unique)
new_strstringrequiredReplacement string
projectPathstringcwdProject root path

kirograph_multi_str_replace requires enableEditPrimitives

Multiple replacements as an all-or-nothing transaction.

ParameterTypeDefaultDescription
filestringrequiredFile path
pairsarrayrequiredArray of {old_str, new_str} objects
projectPathstringcwdProject root path

kirograph_insert_at requires enableEditPrimitives

Insert content before or after an anchor string or line number.

ParameterTypeDefaultDescription
filestringrequiredFile path
anchorstringrequiredAnchor string or line number
contentstringrequiredContent to insert
afterbooleanfalseInsert after anchor (default: before)
linebooleanfalseTreat anchor as line number
projectPathstringcwdProject root path

kirograph_ast_grep_rewrite requires enableEditPrimitives

Structural rewrite via ast-grep (requires ast-grep on PATH).

ParameterTypeDefaultDescription
filestringrequiredFile path
patternstringrequiredast-grep pattern
rewritestringrequiredRewrite template
projectPathstringcwdProject root path

Branch enableBranch 3 tools · ~300 tok

Multi-branch graph management. Each branch gets its own SQLite DB at .kirograph/branch-<name>.db. Use kirograph branch add to start tracking a branch.

kirograph_branch_list requires enableBranch

List tracked branches with DB sizes and last sync times.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_branch_diff requires enableBranch

Symbols added, removed, or changed between two tracked branches.

ParameterTypeDefaultDescription
branchAstringrequiredFirst branch to compare
branchBstringmainSecond branch to compare against
projectPathstringcwdProject root path

Shell Execution enableShellExec 1 tool · ~71 tok

kirograph_exec

Run a shell command and return token-optimized output. Automatically filters noise from git, test runners, linters, build tools, docker, and package managers. 60-90% token savings on verbose commands.

ParameterTypeDefaultDescription
commandstringrequiredShell command to execute
cwdstringproject rootWorking directory
levelstringnormalnormal, aggressive, or ultra
timeoutnumber60Timeout in seconds
projectPathstringcwdProject root path

Agent Utilities enableAgentUtils 4 tools · ~278 tok

kirograph_read enableAgentUtils

Read a file with caching and multiple modes. First read returns full content; subsequent reads of unchanged files return a compact [cached: file unchanged] marker (~13 tokens). Inspired by lean-ctx.

ParameterTypeDefaultDescription
pathstringrequiredFile path (absolute or relative to project root)
modestringfullfull, map (structure overview), signatures (function signatures only), diff (changes since last read), lines (line range), imports, exports
startnumber-Start line (for lines mode)
endnumber-End line (for lines mode)
noCachebooleanfalseForce fresh read, bypass cache
projectPathstringcwdProject root path

kirograph_retrieve enableAgentUtils

CCR — Cached Content Retrieval. Returns the full content stored in the session cache, or reads and caches the file if not yet seen. Use after kirograph_read returns a [cached: file unchanged] marker to recover the actual content without a redundant filesystem read. Inspired by headroom.

ParameterTypeDefaultDescription
pathstringrequiredFile path to retrieve (absolute or relative to project root)
projectPathstringcwdProject root path

kirograph_budget enableAgentUtils

Show current session context budget usage. Returns tokens consumed, remaining budget, and utilization percentage. Inspired by lean-ctx.

ParameterTypeDefaultDescription
resetbooleanfalseReset session budget counters
projectPathstringcwdProject root path

kirograph_gain requires enableAgentUtils

Show token savings statistics from compressed command outputs via kirograph_exec.

ParameterTypeDefaultDescription
periodstringsessionsession, today, week, or all
projectPathstringcwdProject root path

General-purpose Compression enableGeneralCompression 1 tool · ~68 tok

kirograph_compress enableGeneralCompression

On-demand compression for arbitrary text before it reaches the model. Routes to two engines based on whether command is provided. Reports savings inline: [42% saved | 1800→1044 | rtk:git:aggressive]. Inspired by headroom.

ParameterTypeDefaultDescription
textstringrequiredText to compress
commandstring-Shell command that produced this output (e.g. git log, npm test). Activates rtk-style structural filters. Omit for prose/text — uses caveman grammar.
levelstringfullIntensity: lite / normal (light), full / aggressive (medium, default), ultra (maximum)

Memory Tools enableMemory 16 tools · ~746 tok

kirograph_mem_store enableMemory

Store an observation in project memory. Auto-compressed, symbol-linked, and embedded.

ParameterTypeDefaultDescription
contentstringrequiredObservation text
kindstringnotedecision, error, pattern, architecture, summary, note
projectPathstringcwdProject root path

kirograph_mem_timeline enableMemory

List recent sessions and their observations chronologically.

ParameterTypeDefaultDescription
limitnumber5Number of sessions to show
sessionIdstringShow observations for a specific session
projectPathstringcwdProject root path

kirograph_mem_status enableMemory

Memory subsystem health: sessions, observations, embeddings, model mismatch.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

Documentation Tools enableDocs 5 tools · ~241 tok

kirograph_docs_toc enableDocs

Get table of contents for a documentation file or the whole project. Returns section IDs, titles, levels, and summaries.

ParameterTypeDefaultDescription
filestring-Filter to a specific doc file (relative path)
treebooleanfalseReturn nested tree structure
projectPathstringcwdProject root path

kirograph_docs_section enableDocs

Retrieve full content of a documentation section by its stable ID. Use context=true to also get ancestor headings and child summaries.

ParameterTypeDefaultDescription
idstringrequiredSection ID (from TOC or search results)
contextbooleanfalseInclude ancestor heading chain and child summaries
projectPathstringcwdProject root path

kirograph_docs_outline enableDocs

Get the heading hierarchy for a single documentation file. Lighter than full TOC when you know which file is relevant.

ParameterTypeDefaultDescription
filestringrequiredRelative path to the doc file
projectPathstringcwdProject root path

kirograph_docs_refs enableDocs

Find code symbols referenced by a doc section, or doc sections that reference a code symbol. Bidirectional lookup.

ParameterTypeDefaultDescription
sectionIdstring-Doc section ID (find code symbols it references)
nodeIdstring-Code symbol qualified name (find doc sections that reference it)
projectPathstringcwdProject root path

Data Tools enableData 10 tools · ~519 tok

kirograph_data_list enableData

List all indexed datasets with row counts, column counts, and file sizes.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_data_describe enableData

Full schema profile for a dataset: column names, inferred types, cardinality, null percentages, min/max values, and sample values.

ParameterTypeDefaultDescription
datasetstringrequiredDataset ID (from kirograph_data_list)
columnstring-Deep dive on a single column
projectPathstringcwdProject root path

kirograph_data_query enableData

Filtered row retrieval with structured operators. Multiple filters are ANDed. All queries use parameterized SQL (zero injection surface).

ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
filtersFilter[]-Array of {column, op, value}. Ops: eq, neq, gt, gte, lt, lte, contains, in, is_null, between
columnsstring[]allColumn projection
limitnumber500Max rows (hard cap: 500)
offsetnumber0Pagination offset
projectPathstringcwdProject root path

kirograph_data_aggregate enableData

Server-side GROUP BY aggregation. Computation happens in SQLite; only results enter the context window.

ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
groupBystring[]requiredColumns to group by
metricsMetric[]requiredArray of {column, op}. Ops: count, sum, avg, min, max, count_distinct
filtersFilter[]-Pre-aggregation filters
projectPathstringcwdProject root path

kirograph_data_join enableData

SQL JOIN across two indexed datasets. Combines data without loading either file into context.

ParameterTypeDefaultDescription
leftstringrequiredLeft dataset ID
rightstringrequiredRight dataset ID
leftColumnstringrequiredJoin column from left dataset
rightColumnstringrequiredJoin column from right dataset
typestringinnerJoin type: inner, left, right
columnsstring[]allColumn projection (prefix with dataset ID)
limitnumber100Max rows (hard cap: 500)
projectPathstringcwdProject root path

kirograph_data_correlations enableData

Pairwise Pearson correlations between numeric columns. Discovers hidden relationships without loading data.

ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
thresholdnumber0.3Min absolute correlation to include
projectPathstringcwdProject root path

kirograph_data_quality enableData

Data quality triage: rank columns by risk (null rate, cardinality anomalies, type issues). Identifies problematic columns without loading data.

ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
projectPathstringcwdProject root path

Security Tools enableSecurity 15 tools · ~675 tok

kirograph_security enableSecurity

Security overview: total dependencies, vulnerability counts, verdict breakdown (affected/not_affected/under_investigation), and stale data warnings.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_vulns enableSecurity

List vulnerabilities with filtering by severity and reachability verdict. Includes fix suggestions when a fixed version is available.

ParameterTypeDefaultDescription
severitystring-Filter: critical, high, medium, low
verdictstring-Filter: affected, not_affected, under_investigation
limitnumber20Max results
refreshbooleanfalseTrigger fresh enrichment from configured databases before listing
projectPathstringcwdProject root path

kirograph_reachability enableSecurity

Analyze reachability for a specific CVE or dependency. Returns call paths, entry points, and affected layers.

ParameterTypeDefaultDescription
targetstringrequiredCVE identifier (e.g. CVE-2024-1234) or package name (e.g. lodash)
projectPathstringcwdProject root path

kirograph_licenses enableSecurity

List dependency licenses and check against the configured policy (securityLicensePolicy).

ParameterTypeDefaultDescription
policybooleanfalseShow only policy violations (deny/warn)
projectPathstringcwdProject root path

kirograph_staleness enableSecurity

Check dependency freshness — identifies packages significantly behind their latest published version. Supports npm, PyPI, crates.io, RubyGems, and Packagist registries.

ParameterTypeDefaultDescription
thresholdnumber0.3Minimum staleness score (0.0–1.0) to include
refreshbooleanfalseRe-query registries before listing
projectPathstringcwdProject root path

kirograph_sbom enableSecurity

Generate a CycloneDX 1.5 SBOM JSON document containing all project dependencies as components with purl identifiers, scope classification, and dependency relationships.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_vex enableSecurity

Generate a CycloneDX 1.5 VEX JSON document with reachability-derived analysis states. Maps graph verdicts to CycloneDX VEX states.

ParameterTypeDefaultDescription
projectPathstringcwdProject root path

kirograph_vuln_add enableSecurity

Manually register a CVE against a dependency. Useful for private/internal advisories not in public databases.

ParameterTypeDefaultDescription
cveIdstringrequiredCVE identifier (e.g. CVE-2024-9999)
packagestringrequiredPackage name (must match an existing indexed dependency)
severitynumber-CVSS v3.1 base score (0.0–10.0)
summarystring-Human-readable description (truncated to 500 chars)
fixedVersionstring-Version that fixes the vulnerability
projectPathstringcwdProject root path