sdl.repo.register
Registers a new repository (or updates an existing one) for indexing. This is typically the first tool called when connecting a new codebase to SDL-MCP. Creates a repository record in the graph database with the given configuration. Auto-detectspackage.json, tsconfig.json, and workspace configuration. Validates that the root path exists and is not a path-traversal attempt.
Re-registering an existing
repoId updates the configuration without losing indexed data. Registration does not trigger indexing — call sdl.index.refresh afterward.Parameters
Unique identifier for the repository (e.g.,
"my-app").Absolute path to the repository root directory.
Glob patterns to ignore. Defaults to
node_modules, dist, .next, build.Language extensions to index. Defaults to all 12 supported languages:
ts, tsx, js, jsx, py, go, java, cs, c, cpp, php, rs, kt, sh.Maximum file size to index in bytes. Default:
2,000,000.Response
Example
sdl.repo.status
Returns the current indexing state and health metrics for a registered repository. Provides a single-call snapshot of everything happening in the repository: file counts, symbol counts, health score, watcher state, prefetch stats, and live editor buffer status.Parameters
Repository identifier.
Include relevant development memories in the response. Default:
false.Response
Repository identifier.
Absolute path to the repository root.
Most recent ledger version, or
null if never indexed.Total files currently tracked.
Total symbols in the graph.
ISO timestamp of the most recent indexing.
Composite health score from 0–100.
Breakdown of health score components.
Whether health metrics are populated.
File watcher state.
Guidance when watcher is inactive.
Predictive prefetch metrics.
Live editor buffer state.
Relevant development memories auto-surfaced for this repo. Only present when
surfaceMemories: true.Example
sdl.repo.overview
Returns a token-efficient summary of the entire codebase structure, tunable from a cheap stats-only view up to a full architectural overview with hotspots, clusters, and process call-chain summaries.Parameters
Repository identifier.
Detail level.
"stats" is cheapest (~100 tokens). "directories" adds per-directory summaries. "full" adds hotspots and architecture.Force hotspot inclusion at any level. Auto-enabled at
"full".Filter to specific directory paths.
Limit the number of directories returned. Range: 1–200.
Limit exports listed per directory. Range: 1–50.
Response
Aggregate codebase statistics.
Per-directory summaries. Present when
level is "directories" or "full".Codebase hotspot analysis. Present at
"full" level or when includeHotspots: true.Community detection summary.
Call-chain process summary.
Token compression metrics.
Examples
sdl.index.refresh
Triggers re-indexing of a repository in either full or incremental mode. Scans for changed files, parses them, extracts symbols and edges, runs pass-2 call resolution, and writes results to the graph database. Creates a new ledger version and clears slice and card caches. Supports MCP progress notifications.Incremental mode compares file content hashes to detect changes — only changed files are re-parsed. After indexing, all slice caches and card caches are invalidated.
Parameters
Repository identifier.
"full" re-indexes everything; "incremental" only processes files changed since the last index.Optional reason for the refresh (logged for audit purposes).
Response
Success flag.
Repository identifier.
The new ledger version ID created by this indexing run.
Number of files processed during this run.