Skip to main content
Glama

ctx

Codebase intelligence and context engine for AI coding agents.

CI Release npm License MCP

Documentation: https://halloffame12.github.io/CTX · docs overview

Table of contents


ctx builds a queryable code graph for a project — files, symbols, signatures and imports — and turns it into compact, relevance-ranked context for AI tools and for humans. It speaks MCP over stdio, so coding agents (Claude, Cursor, Copilot, opencode and any MCP client) can call it directly.

ctx init                      index the project
ctx doctor                    inspect the project + index health
ctx search "create_user"      find symbols
ctx deps src/app.py           what a file imports (and what imports it)
ctx impact create_user        who would break if I change this?
ctx context "add OAuth"       build a ranked context package for a task
ctx changed                   files & symbols changed since HEAD
ctx diff                      semantic diff of symbols between refs
ctx skeleton src/models.py    body-less structural skeleton
ctx watch                     keep the graph in sync while editing
ctx mcp                       run the MCP server over stdio
ctx stats                     show index statistics (files, symbols, dependencies, db size)
ctx version                   print version information

Related MCP server: agentmako

Why does it exist?

AI coding tools get the codebase wrong in predictable ways: they hallucinate file paths, read whole directories into context, miss ripple effects, and waste tokens. ctx addresses that with:

  • Incremental code graph — a SQLite database (.ctx/index.db) of files, symbols and dependency edges, updated only where files changed.

  • Honest dependency resolution — relative imports, Python dotted modules, Rust use paths and Go imports resolve to real files or are marked external/unresolved. ctx never fabricates internal edges it can't prove.

  • Skeletons over dumps — structural context (signatures, types, exports) without bodies, so a model sees the shape of a codebase in a fraction of the tokens.

  • Explainable ranked context — keyword + hub + recency + path + git scoring picks the handful of files that matter for a task, and tells you why.

  • Impact analysis — cycle-safe BFS over the dependency graph, grouped into direct / indirect / tests / unknown buckets.

  • Git-aware change tracking — symbol-level diffs between refs, not just file status.

ctx is local, fast, private and offline: nothing is sent anywhere, no code is executed, no telemetry.

Install ctx

The ctx command is one native, compiled Rust binary — install it through whichever ecosystem you already use:

Method

Command

macOS / Linux (Homebrew)

brew tap halloffame12/CTX && brew install ctx

Windows (Scoop)

scoop bucket add ctx https://github.com/halloffame12/scoop-ctx && scoop install ctx

Windows (winget)

winget install halloffame12.CTX

Node.js (npm)

npm install -g ctxai-cli

Run without installing

npx ctxai-cli --version

Direct

`curl -fsSL https://ctx.dev/install.sh

The installer scripts currently live in the repository (scripts/install.sh, scripts/install.ps1). Until ctx.dev is live you can run them directly:

curl -fsSL https://raw.githubusercontent.com/halloffame12/CTX/main/scripts/install.sh | sh
irm https://raw.githubusercontent.com/halloffame12/CTX/main/scripts/install.ps1 | iex

Every method installs the same binary, verified against SHA-256 checksums published with each release. No Rust toolchain is required except for cargo install.

Building from source

Requires Rust 1.85+ (edition 2024). On Windows, a GNU toolchain is recommended for the bundled SQLite build:

scoop install mingw
$env:PATH = "$env:USERPROFILE\scoop\apps\mingw\current\bin;" + $env:PATH
cargo build --release
cargo install --path .        # installs `ctx` to PATH

Version is read from the git tag / Cargo.toml:

ctx --version   # ctx 0.1.6
ctx version     # same

Quick start

cd your-project
ctx init                     # creates .ctx/config.toml + indexes the project
ctx doctor                   # verify the index is current
ctx search "migrate"         # find functions/methods matching
ctx deps src/lib.rs          # what this file imports / what imports it
ctx impact create_user       # change analysis for a symbol or path
ctx context "add pagination" # context package for a task (JSON with --json)

Reasoning about how much context ctx saves

Without ctx, an agent trying to understand a change typically has a human paste a few files:

AI reads:
  12,000 lines of source
  ~100,000 tokens

With ctx:
  AI receives an architecture tree
  relevant symbols + signatures
  dependency / impact map
  skeletons of the files that matter
  target implementations only when relevant

These numbers are illustrative, not benchmarks — run ctx benchmark for real timings on your own repository.

CLI reference

Usage: ctx [OPTIONS] [COMMAND]

Commands:
  init        Create .ctx, write a default config and index the project
  doctor      Inspect the project and report the health of the ctx index
  skeleton    Show a body-less structural skeleton of a source file
  search     Search the graph for symbols or files
  symbol     Details about a symbol: definition, references, dependencies
  deps       Show what a file imports and what imports it
  impact     Analyze impact of changing a symbol or file
  context     Build a relevance-ranked context package for a task
  changed     Show symbols changed in the working tree or between refs
  diff       Semantic diff of symbols between two git refs
  schema      Print the SQLite graph schema
  benchmark  Re-run an index pass and print incremental timing
  watch      Watch the project and keep the graph in sync
  mcp        Run the Model Context Protocol server over stdio
  stats      Show index statistics (files, symbols, dependencies, db size)
  version    Print version information
  help       Print this message or the help of the given subcommand(s)

Options:
  -R, --root <DIR>  Project root (defaults to the nearest directory containing .ctx)
  -j, --json        Emit machine-readable JSON instead of human text
  -q, --quiet       Suppress non-essential output
  -v, --verbose     Enable verbose diagnostics on stderr
      --no-color    Disable ANSI colors
  -h, --help        Print help
  -V, --version     Print version

Per-command help always available:

ctx context --help
ctx impact --help

ctx context — the flagship

ctx context "add Google OAuth authentication"

Scoring is deterministic and explainable. Every suggested file carries the reasons it was selected:

Suggested files:
  src/auth/oauth.ts  (score 0.91, ~180 tokens)
      + exact symbol match `OAuthProvider`
      + path matches keyword `auth`
      + imported by 4 files (hub)
      + modified in working tree
Context budget: 1,842 / 12,000 tokens (estimate)
Omitted: 13 lower-relevance files

If the budget cannot hold the top files, budget_exceeded: true is reported in JSON rather than silently truncating. Working-tree git changes get a small scoring bonus automatically (--no-git disables it).

ctx impact

ctx impact UserService.updateUser --depth 5 --json

Results are grouped:

Direct dependents
Indirect dependents
Tests
UNKNOWN (unresolvable imports in affected files)
Potentially affected: N files / M symbols

Traversal is BFS with per-node cycle protection, bounded by --depth.

ctx doctor

ctx doctor          # human-readable
ctx doctor --json   # machine-readable

Reports git presence, detected languages, framework, package manager, index freshness (files changed on disk since indexing), SQLite health and parser support — with a final Status: READY / STALE / NOT INITIALIZED.

ctx search "user"                    # case-insensitive name match
ctx search --kind struct "user"      # filter by symbol kind
ctx search --kind function User      # kind aliases: fn, const, alias
ctx search --files "src/auth"        # search file paths instead
ctx search "user" --limit 20         # default 50, clamped to 1–500

Symbol kinds: function, method, class, interface, type, enum, constant, variable, struct, trait, module, field, constructor, impl — with aliases fn → function, const → constant, alias → type. An invalid kind is rejected (exit 2).

ctx stats / ctx version

ctx stats            # files, symbols, dependency edges, index.db size
ctx stats --json
ctx version          # ctx 0.1.6
ctx version --json   # {"name":"ctx","version":"0.1.6"}

JSON mode

Every query command has deterministic JSON output:

ctx search User --json
ctx symbol UserService --json
ctx deps src/user.ts --json
ctx impact UserService --json
ctx context "add OAuth" --json
ctx changed --json
ctx diff --json
ctx doctor --json
ctx init --json
ctx benchmark --json
ctx schema --json
ctx stats --json
ctx version --json

Invariants: stdout is JSON only — no ANSI codes, no decorations, no progress bars. Diagnostics go to stderr. Errors exit non-zero with a message on stderr.

MCP server

ctx mcp                      # speaks MCP over stdio
ctx -R /path/to/project mcp  # or target a project root explicitly
npx ctxai-cli mcp            # no install required

The server implements JSON-RPC 2.0 over line-delimited stdio:

  • initialize, ping, notifications/initialized, tools/list, tools/call

  • prompts/list and resources/list are served (empty by default)

  • unknown methods → -32601, invalid JSON → -32700, tool errors surface as isError: true results

  • stdout carries protocol messages only; all logs go to stderr

Tools exposed:

Tool

Purpose

ctx_project

project overview (root, git, counts)

ctx_search

symbol / file search (with kind + files filters)

ctx_skeleton

body-less structural skeleton of a file

ctx_symbol

definition, methods, references, deps of a symbol

ctx_dependencies / ctx_dependents

outgoing / incoming imports

ctx_impact

change-impact analysis (symbol or path, depth)

ctx_context

ranked context package (task, include_bodies, max_tokens)

ctx_changed

files & symbols changed since a ref

ctx_diff

semantic diff of symbols between refs (single base resolves to its merge-base with HEAD)

ctx_stats

index statistics (files, symbols, dependencies, db size)

opencode

Add ctx as an MCP server (see opencode's MCP configuration docs):

{
  "mcpServers": {
    "ctx": {
      "command": "npx",
      "args": ["-y", "ctxai-cli", "mcp", "-R", "/absolute/path/to/project"]
    }
  }
}

Claude / Claude Desktop

{
  "mcpServers": {
    "ctx": {
      "command": "npx",
      "args": ["-y", "ctxai-cli", "mcp", "-R", "/absolute/path/to/project"]
    }
  }
}

Cursor

Settings → MCP → Add → type command, then:

{
  "command": "npx",
  "args": ["-y", "ctxai-cli", "mcp", "-R", "/absolute/path/to/project"]
}

VS Code (Cline / Roo / Continue)

Add an MCP server of type stdio:

command: npx
args: -y ctxai-cli mcp -R /absolute/path/to/project

npx form requires no global install. If ctx is already on your PATH, replace "command": "npx", "args": ["-y", "ctxai-cli", ...] with "command": "ctx", "args": ["mcp", ...].

Supported languages

Language

Files

Symbols

Dependencies

Skeleton

TypeScript

ts, tsx, mts, cts

functions, methods, classes, interfaces, enums, constants, fields, modules, type aliases

import / require / dynamic import() / re-exports; ./, ../, @/ aliases, bare specifiers

bodies elided, docs kept

JavaScript

js, jsx, mjs, cjs

same as TS

same as TS

bodies elided

Python

py, pyi, pyw

functions, methods, classes, constants, module-level vars

import x, from x import y, relative imports

bodies elided

Rust

rs

functions, structs, enums, traits, impl blocks, methods, consts

usecrate::, self::, super::

impl/fn bodies elided, struct/enum kept

Go

go

functions, methods, types, interfaces, consts

package import paths

fn/method bodies elided, types kept

Partially-broken files degrade gracefully: tree-sitter recovers, valid symbols are still extracted, and the file is reported in parse_errors for the ctx init summary instead of aborting the index.

Security

  • Indexing never executes project code or evaluates scripts.

  • Paths are validated before use: any user-supplied path that lexically escapes the project root is rejected (path is outside the project root), including through MCP (e.g. ../../../../etc/passwd).

  • No telemetry, no network calls, no external AI APIs. The engine is fully local and offline.

Privacy

ctx reads source files, writes a local SQLite index under .ctx/, and spawns git for change queries. Nothing leaves the machine.

Configuration

.ctx/config.toml is written on ctx init:

[index]
exclude = ["node_modules", "target", ".git", ".ctx", "dist", "build", "vendor"]
max_file_size = 2097152
follow_symlinks = false

[context]
max_tokens = 12000
max_files = 25
include_bodies = false

[watch]
enabled = true
debounce_ms = 200

Architecture

src/
  parser/     tree-sitter extractors (Rust, TypeScript/JS, Python, Go) + resolver
  graph/      SQLite code graph: database, symbols, dependencies, impact
  indexing/   scanning (gitignore-aware), hashing, incremental reindex
  context/    skeletons, ranking, context package builder
  git/        diff & changed tracking via the `git` binary
  mcp/        JSON-RPC server, tools, protocol types
  commands/   CLI + MCP command implementations

Development

cargo build
cargo test --lib --test integration --test skeleton   # unit + integration + golden
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --check

Repository layout

src/
  parser/     tree-sitter extractors (Rust, TypeScript/JS, Python, Go) + resolver
  graph/      SQLite code graph: database, symbols, dependencies, impact
  indexing/   scanning (gitignore-aware), hashing, incremental reindex
  context/    skeletons, ranking, context package builder
  git/        diff & changed tracking via the `git` binary
  mcp/        JSON-RPC server, tools, protocol types
  commands/   CLI + MCP command implementations
tests/        integration + skeleton golden tests
packaging/    Homebrew tap, WinGet, Scoop manifests
packages/npm/ ctxai-cli meta package + 6 platform packages
scripts/      release + install tooling
website/      Next.js docs site (static export -> GitHub Pages)

Contributing

See CONTRIBUTING.md (setup, conventions, testing) and AGENTS.md (the invariants every change must preserve). Security issues go to SECURITY.md. All participants are expected to follow our Code of Conduct.

GitHub Actions CI runs fmt, clippy (-D warnings, all targets/features), tests and release builds on Linux / macOS / Windows. The release workflow publishes prebuilt binaries (6 targets) with a checksums.txt for each tag, and the npm workflow publishes the ctxai-cli meta package + 6 platform packages with provenance. package-validation.yml keeps all packaging in sync with Cargo.toml. See RELEASE.md for the full release checklist.

Packaging lives in packaging/ (Homebrew tap, Winget, Scoop) and packages/ (npm). Release tooling is in scripts/ (build-release.sh, verify-release.sh, generate-checksums.sh, install.sh, install.ps1, update-homebrew.sh, update-package-manifests.sh).

Note: cargo test --bin ctx may be blocked by Windows Application Control policy on some machines (os error 4551); the library, integration and golden suites above cover the behavior.

Roadmap

  • Serverside of ctx doctor: expose diagnostics via MCP.

  • Column/method-level references and more static symbol-reference resolution.

  • Config-file reading for Node/TypeScript path aliases (tsconfig paths).

  • Cargo / Go workspace awareness for module-boundary imports.

  • ctx context incremental "focus files" (files you've asked the agent to touch) to steer ranking.

License

MIT — see LICENSE.

Available Tools

11 tools
ctx_changedA

Return files and symbols changed since a git reference as JSON, including working-tree changes by default. Use to focus an agent on what changed in a branch or commit range before reviewing or testing. ref is a git ref (e.g. HEAD~5, main, a SHA); omit it to report uncommitted working-tree changes. Only works in git repositories (returns an error otherwise). For a per-symbol semantic diff between two refs use ctx_diff; for a plain list of changed file paths use this tool.

ParametersJSON Schema
NameRequiredDescriptionDefault
refNoGit ref to diff against, e.g. HEAD, main, HEAD~5, or a commit SHA. Omit to report working-tree (uncommitted) changes.

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It reveals the JSON return, the default inclusion of working-tree changes, the behavior when ref is omitted, and the error case for non-git repositories. This is substantial and gives an agent accurate expectations beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences with the core behavior first, then usage context, parameter explanation, and the sibling alternative. Every sentence contributes distinct information and there is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition is complete enough for a single-optional-parameter tool: it covers output type, parameter semantics, non-git failure, and the sibling distinction. However, with no output schema it does not detail the JSON shape or define what a 'symbol' is, which leaves slight ambiguity about the exact return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by providing concrete ref examples (HEAD~5, main, a SHA) and by clarifying the default working-tree behavior, but it mostly reinforces what the schema already states for the single optional parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Return files and symbols changed since a git reference as JSON'. This clearly states what the tool produces, distinguishes it from siblings like ctx_diff, and includes the working-tree default. It is not a tautology and conveys the tool's exact scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly explains when to use the tool ('focus an agent on what changed ... before reviewing or testing') and names the alternative for a different need ('For a per-symbol semantic diff between two refs use ctx_diff'). It also states the git-repository precondition, so an agent knows when the call will fail.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_contextA

Build a compact, relevance-ranked context package for a coding task and return it as JSON. This is the high-value tool: give it a natural-language task and it returns the most relevant files/symbols/snippets to feed to an LLM, optionally including recent git changes. Use when you need a focused slice of the codebase for a prompt instead of reading many files. task is required and should describe the goal; include_bodies (default false) embeds function bodies; max_tokens (default auto, 128-100000) caps package size.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYesNatural-language description of the coding task the context should support. Required.
max_tokensNoUpper bound on package size in tokens. Omit for automatic sizing.
include_bodiesNoWhen true, include function/body text in the package (larger output). Default false.

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure, and it provides meaningful details: output is JSON, results are relevance-ranked, recent git changes can be included, include_bodies embeds function bodies, and max_tokens caps package size. This goes well beyond what the schema alone states, though it does not address potential costs, errors, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with the core purpose stated in the first sentence. The second sentence adds functional emphasis and usage context, and the third compacts parameter guidance efficiently. The phrase 'This is the high-value tool' is promotional but not harmful, and overall the description is well-structured and free of redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives the agent enough to invoke the tool correctly: a required natural-language task, optional body inclusion, token capping, and a JSON output of files/symbols/snippets. With no output schema, a little more detail about the exact output structure would improve completeness, but the description covers the essential invocation contract.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has 100% description coverage for all three parameters, so the schema does the heavy lifting. The description adds useful default information ('include_bodies default false', 'max_tokens default auto') and clarifies each parameter's role, but this is supplemental rather than necessary for understanding the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Build a compact, relevance-ranked context package... and return it as JSON.' It clearly describes what the tool does and what the agent can expect from it. However, it does not explicitly distinguish this tool from its many sibling tools like ctx_symbol, ctx_skeleton, or ctx_search, so differentiation is left mostly implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear usage context: 'Use when you need a focused slice of the codebase for a prompt instead of reading many files.' This tells the agent when the tool is appropriate, but it does not mention when not to use it or name alternative sibling tools. The guidance is useful but lacks explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_dependenciesA

Return the outbound import edges of a file as JSON: [{target, imported_symbol}] — the project files/modules it imports and, where known, the symbol imported. Use to see what a file depends on before refactoring it. path is project-relative or absolute (traversal rejected). For the reverse direction (who imports this) use ctx_dependents. Requires the project to be indexed.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject-relative or absolute file path. Paths outside the project root are rejected. Required.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the disclosure burden. It covers key behavioral traits: returns JSON with a specific shape, rejects path traversal, and requires an indexed project. It reasonably implies a read-only operation through 'Return' and 'Use to see'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences each carry distinct information: output shape and purpose, parameter constraint, and alternative tool plus prerequisite. No filler, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read-only query with no output schema, the description fully equips an agent: return format, field names, path semantics, use case, sibling alternative, and prerequisite. Nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%: the path parameter is already fully described (project-relative or absolute, outside root rejected, required). The description repeats this and adds 'traversal rejected', which is marginal value beyond the schema, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description starts with a specific verb and resource: 'Return the outbound import edges of a file as JSON'. It names the output shape and explicitly distinguishes itself from ctx_dependents ('For the reverse direction...use ctx_dependents'), so an agent can select it correctly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States when to use it ('before refactoring it'), names the reverse-direction alternative explicitly, and gives a prerequisite ('Requires the project to be indexed'). This is clear, actionable usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_dependentsA

Return the inbound (reverse) dependency edges of a file as JSON: [{source, imported_symbol}] — the project files that import it and, where known, the symbol they import. Use to find every consumer of a file before changing or removing it. path is project-relative or absolute (traversal rejected). For the forward direction (what a file imports) use ctx_dependencies.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject-relative or absolute file path. Paths outside the project root are rejected. Required.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral burden. It discloses the exact return shape, the reverse-dependency behavior, and a key security constraint: path traversal is rejected. It does not discuss potential errors for nonexistent files, but the disclosed behavior is substantial for a read-only lookup tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: it leads with the operation and output shape, then the use case, then path semantics, then the sibling alternative. Every sentence earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description is complete. It provides the return format, path rules, usage context, and the relevant sibling alternative, so an agent has enough information to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'path' has 100% schema description coverage, so the schema already documents that it must be a project-relative or absolute path outside the project root is rejected. The description mostly restates this schema meaning, adding no significant new parameter-level semantics beyond clarifying the traversal rejection.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's purpose: it returns inbound dependency edges for a file as JSON with a specific shape, [{source, imported_symbol}]. It also distinguishes itself from the forward-direction sibling ctx_dependencies by explicitly naming the reverse direction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool: 'Use to find every consumer of a file before changing or removing it.' It also names the alternative for the forward direction, ctx_dependencies, giving clear routing guidance for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_diffA

Return a semantic symbol diff between two git refs as JSON: the symbols added, modified or removed per file. Compared to ctx_changed, this is a structural (symbol-aware) diff rather than a file list. Provide base and head explicitly, or supply only base (or neither) — when base alone is given it resolves to its merge-base with HEAD so the diff shows only the current branch's changes; head defaults to HEAD. Only works in git repositories.

ParametersJSON Schema
NameRequiredDescriptionDefault
baseNoBase git ref. Optional: if only base (or neither) is given, base resolves to its merge-base with HEAD, showing only the current branch's additions/modifications/removals. Defaults to HEAD.
headNoHead git ref to compare against base. Defaults to HEAD.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses the result shape (added/modified/removed symbols per file), default ref resolution, merge-base behavior, and the git-repository precondition. It does not explicitly state read-only/no side effects or empty/error behavior, but 'diff' and 'Return' strongly imply a non-mutating read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core purpose, then the sibling distinction, then invocation semantics and the key constraint. Every sentence earns its place and there is no redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with only two optional parameters, no output schema, and no annotations, the description communicates the result format, ref-resolution rules, and the git-only restriction. The unresolved 'or neither' case and lack of explicit side-effect or error behavior prevent a perfect completeness score, but overall the description is quite informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameters are already fully documented in the input schema. The description largely restates the same default and merge-base semantics without adding new parameter-level detail. The 'or neither' case remains ambiguous in both the schema and the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Return'), a clear resource ('semantic symbol diff between two git refs'), and the output format ('as JSON'). It also explicitly distinguishes itself from the sibling ctx_changed by framing this as a structural, symbol-aware diff rather than a file list, which removes ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names ctx_changed as the alternative and explains the structural-vs-file-list distinction, giving agents a clear selection cue. It also provides practical guidance on supplying base/head and the merge-base behavior. The 'or neither' option is mentioned but not fully clarified, leaving some ambiguity about what happens when no refs are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_impactA

Analyze the blast radius of changing a symbol or file. Returns an ImpactReport: {target, target_symbol, depth, direct, indirect, tests, unknown} where direct/indirect/test lists are [{path, distance, symbols}]; unknown surfaces imports that could not be statically mapped. Use before modifying code to estimate what else must be checked or updated. Provide exactly one of symbol (a name) or path (a project-relative file); depth controls how many hops of indirect impact to traverse (default 3, 1-20). Requires the project to be indexed; returns an error object if the target is not found.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoProject-relative file path to analyze, as an alternative to symbol.
depthNoHow many hops of indirect impact to traverse. Default 3.
symbolNoSymbol name to analyze. Provide this OR path, not both.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden and does so well: it specifies the report structure, the shape of impact lists, error behavior for missing targets, the indexed-project prerequisite, and depth semantics. No contradiction with annotations because none exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but structured: purpose first, output shape second, invocation constraints third. Every clause contributes necessary information for selecting and calling the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

In the absence of an output schema, the description enumerates all report fields and list item shapes, explains unknown imports, and covers error and precondition behavior. An agent has enough to invoke the tool and interpret its result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are fully described in the input schema, so the baseline is 3. The description restates the one-of exclusivity, symbol/path meanings, and depth default/range without adding genuinely new semantic information beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: analyze the blast radius of changing a symbol or file. The ImpactReport output and pre-modification use case make it identifiable against sibling tools like ctx_dependencies or ctx_dependents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use the tool before modifying code to estimate what else must be checked or updated. It does not mention when not to use it or name sibling alternatives, but the use context is clear enough for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_projectA

Return the project overview as JSON: {root, git, files, symbols, dependencies, languages}. Use this first to orient a coding agent on a repo: absolute root path, git root, and how large the codebase is (counts of indexed files, symbols and dependency edges, plus the distinct languages present). Requires the project to have been indexed (see ctx_search for symbol lookup). Returns only counts, never file contents. Prefer ctx_stats for detailed index-health numbers (e.g. index.db size) and ctx_search to actually find symbols.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the return shape, that it returns only counts and never file contents, and that indexing is required. This is strong behavioral transparency for a zero-parameter read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence earns its place: output format, use case, prerequisite, and sibling routing. It is front-loaded with the most important information and contains no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description is complete: it explains return values, scope, constraints, and how to choose sibling tools. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so the baseline is 4. The description still adds value by explaining what each returned field represents (counts, paths, languages), which helps the agent interpret the output correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: returns the project overview as JSON with an explicit key list. It clearly distinguishes itself from siblings by positioning itself as the first orientation tool and referencing ctx_search and ctx_stats as alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it: 'Use this first to orient a coding agent on a repo.' It also gives a prerequisite (project indexed) and names alternatives: ctx_stats for index-health details and ctx_search for finding symbols.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_skeletonA

Return a body-less structural skeleton of one source file as {path, language, skeleton}. The skeleton preserves signatures, types, exports and doc comments but strips function bodies, so it is a compact map of a file's public API and structure. Use before editing a file to understand its shape without reading the whole body. path is project-relative or absolute (must be inside the project; traversal is rejected). Set with_stats=true to also include {stats} (symbol counts). Only paths for supported languages can be resolved (error otherwise); use ctx_search (files=true) to confirm a path first.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject-relative or absolute file path. Paths outside the project root are rejected. Required.
with_statsNoWhen true, include a {stats} field with symbol counts. Default false.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral disclosure burden and does it well: it specifies output shape, body-stripping behavior, path traversal rejection, supported-language error handling, and the optional stats flag. Minor gaps remain around missing-file behavior and any permissions required, but the description is notably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: output shape first, then what the skeleton contains, then usage guidance, then parameter and error behavior. Every sentence adds useful information and there is no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description appropriately explains the return shape and skeleton semantics. It also covers errors, path constraints, and the optional stats field. It would be slightly more complete if it described the exact skeleton format or file-not-found behavior, but the given level is sufficient for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters fully. The description mostly restates the same path constraints and with_stats behavior without adding new semantic detail, so it stays at the baseline for complete schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and result: returning a body-less structural skeleton of one source file with a defined output shape {path, language, skeleton}. It clearly explains what the skeleton preserves and strips, distinguishing it from sibling tools like ctx_dependencies or ctx_stats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use context: 'Use before editing a file to understand its shape' and points to ctx_search as a fallback for path confirmation. However, it does not explicitly state when not to use this tool versus other sibling tools beyond the file-path check.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_statsA

Return index-health statistics as JSON: counts of indexed files, symbols and dependency edges, plus the size of index.db (the underlying code-graph database). Use to check whether the project has been indexed (all-zero counts mean you must run init/indexing before graph tools such as ctx_search or ctx_impact will return results). Read-only, no side effects. For a broader project overview (root/git/languages) use ctx_project.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so well: it discloses read-only nature, no side effects, the JSON return shape, and the meaning of zero counts as a pending-index signal. This goes beyond the structured data and gives the agent actionable expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: purpose first, then usage guidance, then a clear sibling alternative. Each sentence contributes distinct value with no repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter stats tool with no output schema, the description adequately explains what is returned (file/symbol/edge counts and index.db size), how to interpret it (all-zero means not indexed), and what to do next. No critical context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema fully covers everything there is to know. The description adds no parameter-specific detail, but none is needed; this matches the baseline for a no-parameter tool. It instead clarifies output semantics, which is more relevant here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Return index-health statistics as JSON' with precise contents (counts of indexed files, symbols, dependency edges, index.db size). It clearly distinguishes itself from siblings by naming ctx_project as the alternative for broader project overview and implying a separate role from the graph search/impact tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells when to use the tool: 'Use to check whether the project has been indexed' and explains the consequence of all-zero counts (must run init/indexing before graph tools work). It also names the alternative for broader overviews (ctx_project), giving clear routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ctx_symbolA

Return deep detail for a single symbol as JSON: [{name, kind, signature, file, line, methods, references, dependencies}]. Use when you already know the exact symbol name and need its definition, signature, methods it exposes, everywhere it is referenced, and its dependencies. For fuzzy or name-based discovery use ctx_search first, then ctx_symbol for the best match. Returns an array because a name may resolve in multiple files.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesExact symbol name to look up (e.g. a function, struct, trait or type name). Required.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the return format, lists the JSON fields, and reveals that the result is an array because a name may resolve in multiple files. It does not cover error behavior or permission requirements, but for a read-only symbol lookup these are minor omissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four concise sentences, each earning its place: the first states the action and output shape, the second gives usage conditions, the third names the alternative workflow, and the fourth clarifies an important return-behavior nuance. It is front-loaded with the most critical information and contains no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema, the description is largely complete: it explains what the tool returns, when to use it, and why the result may be an array. It could be slightly stronger by explicitly contrasting with ctx_skeleton or ctx_dependencies, and by stating what happens when no symbol is found, but these are gaps rather than fatal omissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the single parameter with 100% coverage, calling it an 'Exact symbol name' and giving examples. The description essentially repeats this by saying 'already know the exact symbol name' and does not add meaningful new parameter semantics beyond the schema. Baseline 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Return deep detail for a single symbol as JSON', followed by the exact output fields. It clearly distinguishes itself from ctx_search by stating that exact names are required, while fuzzy discovery belongs to ctx_search. This makes the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool: 'when you already know the exact symbol name' and need definition, signature, methods, references, and dependencies. It also provides a direct alternative and workflow: use ctx_search first for fuzzy discovery, then ctx_symbol for the best match. This is strong, actionable guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 11 tool updatesv0.1.0
    • First observedctx_changed
    • First observedctx_context
    • First observedctx_dependencies
    • First observedctx_dependents
    • First observedctx_diff
    • First observedctx_impact
    • First observedctx_project
    • First observedctx_search
    • First observedctx_skeleton
    • First observedctx_stats
    • First observedctx_symbol

TDQS

A4.4/5.0

Scored across 11 tools

Disambiguation4/5

Most tools are clearly distinct, with ctx_symbol, ctx_search, ctx_skeleton, and ctx_context each serving a different purpose. The only mild ambiguities are ctx_project vs ctx_stats and ctx_changed vs ctx_diff, but the descriptions explicitly point to the more detailed or semantic variant.

Naming Consistency4/5

All tools share the consistent ctx_ prefix and use lowercase snake_case, which makes the set feel uniform. However, the names mix nouns (symbol, skeleton, impact), a verb (search), and an adjective (changed), so it is not a strict verb_noun pattern throughout.

Tool Count5/5

Eleven tools is a well-scoped size for a code-context server. Each tool covers a distinct aspect of code navigation, dependency analysis, impact assessment, or change tracking without redundant entries.

Completeness5/5

The tool set covers the full workflow: orient with ctx_project, search and inspect symbols, understand file structure, trace dependencies in both directions, assess impact, and inspect git changes at file or symbol level. There are no obvious dead ends for an agent trying to build a contextual picture of a codebase.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Deep code indexing for AI agents. Search symbols, navigate call graphs, explore inheritance, track git history — all via MCP.
    599 PyPI
    57
    MIT
  • A
    license
    C
    quality
    A
    maintenance
    Local-first codebase intelligence engine providing AI coding agents with a typed MCP toolset for understanding and navigating code repositories.
    100
    51
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    Local-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.
    5
    15 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides coding agents with searchable codebase context through an MCP server, enabling hybrid BM25 and semantic search, symbol graph navigation, and dependency mapping over an incrementally maintained repository index.
    127 PyPI
    84
    Apache 2.0