Understand-Anything MCP Server
This server exposes codebase and business-domain knowledge graphs to MCP-compatible AI assistants, enabling deep, evidence-based code understanding through 17 query tools.
Project discovery & stats:
list_projects,get_graph_stats,get_graph_metadata, andget_tourgive overviews, freshness analysis, and guided walkthroughs.Code graph search:
query_nodesperforms weighted fuzzy search;get_node_detailreturns full node info;get_node_sourceextracts real source code.Relationship & call analysis:
get_relationships,trace_call_chain,find_impact, andfind_entry_pointsmap connections, call trees, blast radius, and API candidates.Architecture & navigation:
get_layer_infolists/explores layers,search_by_file_pathfinds nodes by path,find_pathfinds shortest connections, andget_class_hierarchyshows inheritance trees.Business domain insight:
get_domain_overview,get_domain_detail, andget_domain_flow_detailexplain business domains, flows, steps, and their code cross-references.Multi-project support: Load many projects and let the AI auto-select or explicitly pass a
projectparameter.Freshness & auto-reload: Graph files are checked against git HEAD and reloaded when changed on disk.
Skill integration: A bundled
codebase-explainskill enforces evidence-only, freshness-gated explanations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Understand-Anything MCP ServerFind all entry points in the project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

🧠 Understand-Anything MCP Server
MCP Server giúp trợ lý AI hiểu sâu bất kỳ codebase nào thông qua Knowledge Graph.
Giới thiệu
MCP Server này tải các Knowledge Graph được tạo bởi Understand-Anything và cung cấp chúng dưới dạng các tool có thể truy vấn cho bất kỳ trợ lý AI tương thích MCP nào (Gemini CLI, Claude Desktop, Cursor, v.v.).
Server hỗ trợ hai loại đồ thị đồng thời cho mỗi dự án:
Đồ thị | Tệp | Nội dung |
Code Graph |
| Files, functions, classes, imports, chuỗi gọi hàm, các tầng kiến trúc |
Domain Graph |
| Nghiệp vụ (domains), luồng xử lý (flows), bước (steps), thực thể, quy tắc nghiệp vụ |
Hỗ trợ đa dự án — Tải N dự án cùng lúc và truy vấn bất kỳ dự án nào. AI tự động nhận diện dự án phù hợp dựa trên ngữ cảnh workspace.
Tính năng nổi bật
🔍 Tìm kiếm mờ (Fuzzy search) — Tìm kiếm có trọng số (tên 3x > mô tả 1.5x > tags 1x) sử dụng
rapidfuzz🏗️ Tầng kiến trúc — Truy vấn theo layer (controller, service, repository, v.v.)
🌊 Truy vết chuỗi gọi hàm — Duyệt BFS theo các lời gọi hàm
💥 Phân tích vùng ảnh hưởng — Tìm tất cả node bị ảnh hưởng khi thay đổi một node (BFS ngược)
🎯 Phát hiện entry point — Nhận diện API endpoint và các hàm không được gọi bởi hàm khác
🏢 Tri thức nghiệp vụ — Domains, flows, steps, thực thể và quy tắc nghiệp vụ
📖 Trích xuất mã nguồn đa ngôn ngữ — Đọc source code thực tế của bất kỳ node nào, hỗ trợ trích xuất symbol-level cho Java, Kotlin, TypeScript, JavaScript, Python, Go, Rust, C#
🔗 Tìm đường ngắn nhất — BFS vô hướng giữa hai node bất kỳ trong đồ thị
🏛️ Cây kế thừa — Truy vết extends/implements lên và xuống toàn bộ hệ thống phân cấp class
📁 Tìm kiếm theo đường dẫn — Tìm tất cả node theo package/module/thư mục path (O(P) qua path index)
🌉 Domain↔Code Cross-reference — Tự động bridge từ domain step → code node qua
_nodes_by_pathindex O(1), semantic ranking khi prefix match (penalize boilerplate, ưu tiên class liên quan theo tên/mô tả/tags)🔄 Tự động tải lại — Phát hiện khi file graph thay đổi trên đĩa và tự động reload
✅ Phân tích độ mới — So sánh commit hash của graph với HEAD hiện tại qua
git diff⚡ Edge Resolution Layer — Class và function node tự động kế thừa quan hệ từ file cha, tra cứu O(degree) qua edge index
🧪 59 unit tests — Bộ test toàn diện bảo vệ regressions, chạy trong <0.1s
📚 Skill kèm theo —
codebase-explain: hướng dẫn AI giải thích sâu file/symbol/module/business flow bằng evidence read-only từ server (output có cấu trúc, gắn freshness, không bịa node ID)
Related MCP server: PT-MCP (Paul Test Man Context Protocol)
Bắt đầu nhanh
Yêu cầu
Python ≥ 3.12
Trình quản lý package
uvMột dự án đã được tạo graph bởi Understand-Anything (thư mục
.understand-anything/)
Cài đặt & Chạy
# Clone repository
git clone https://github.com/VIethoangnguyenle/Understand-Anything-MCP.git
cd Understand-Anything-MCP
# Cài đặt dependencies
uv sync
# Chạy với MCP Inspector (để test/debug)
PROJECT_ROOTS=/đường/dẫn/tới/dự-án npx @modelcontextprotocol/inspector uv run server.py
# Chạy MCP dev server
PROJECT_ROOTS=/đường/dẫn/tới/dự-án mcp dev server.pyĐa dự án
Đặt PROJECT_ROOTS là danh sách đường dẫn phân cách bằng dấu phẩy:
PROJECT_ROOTS=/đường/dẫn/dự-án-a,/đường/dẫn/dự-án-b uv run server.pyMỗi tool đều nhận tham số project tùy chọn. Nếu chỉ có một dự án được tải, nó sẽ được sử dụng tự động.
Chạy bằng Docker
Repo kèm sẵn Dockerfile và compose.example.yaml để chạy server trong container — không cần cài Python hay uv trên máy, và dự án được mount chỉ đọc.
Dựng ảnh
docker build -t ua-mcp:local .Chạy một lần
Server nói MCP qua stdio, không mở cổng nào. Vì vậy phải chạy với -i, và đừng docker compose up -d — container sẽ khởi động rồi thoát ngay vì không ai nối vào stdin.
docker run -i --rm \
-v /đường/dẫn/dự-án:/data/du-an:ro \
-e PROJECT_ROOTS=/data/du-an \
-e GIT_CONFIG_COUNT=1 \
-e GIT_CONFIG_KEY_0=safe.directory \
-e GIT_CONFIG_VALUE_0='*' \
ua-mcp:localHoặc chép compose.example.yaml thành compose.yaml, sửa đường dẫn, rồi:
docker compose run --rm -T ua-mcpNối vào MCP client
Trỏ client thẳng vào docker, thay vì uv:
{
"mcpServers": {
"understand-anything": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/đường/dẫn/dự-án:/data/du-an:ro",
"-e", "PROJECT_ROOTS=/data/du-an",
"-e", "GIT_CONFIG_COUNT=1",
"-e", "GIT_CONFIG_KEY_0=safe.directory",
"-e", "GIT_CONFIG_VALUE_0=*",
"ua-mcp:local"
]
}
}
}Hai cái bẫy khiến FRESHNESS luôn UNKNOWN
Cả hai đều fail trong im lặng — server chạy bình thường, tool trả lời bình thường, chỉ có FRESHNESS âm thầm về UNKNOWN mãi mãi. Nhìn từ ngoài giống hệt như dự án không phải git checkout, nên rất dễ bỏ qua.
Ảnh phải có
git.check_freshnessgọigit rev-parse HEADvàgit diffbên trong thư mục dự án. Basepython:3.12-slimkhông kèmgit; thiếu nó thìFileNotFoundErrorbị nuốt và mọi dự án đều báoUNKNOWN.Dockerfiletrong repo đã cài sẵn.Phải khai báo
safe.directory. Dự án mount vào container thường thuộc uid khác với user chạy trong container, git từ chối với dubious ownership và mọi lệnh đều fail. Dùng biến môi trườngGIT_CONFIG_COUNT/GIT_CONFIG_KEY_0/GIT_CONFIG_VALUE_0thay vì ghi~/.gitconfig— container chạyread_onlynên không ghi file config được.
Kiểm nhanh sau khi dựng ảnh:
docker run --rm ua-mcp:local git --versionRồi gọi get_graph_stats và xem mục FRESHNESS có thoát khỏi UNKNOWN không.
Ghi chú bảo mật
compose.example.yaml mặc định bật read_only: true, cap_drop: ALL, no-new-privileges, và chạy bằng uid không phải root (1001). Server chỉ đọc graph rồi trả lời truy vấn nên không cần ghi gì; chỉ khi bật usage metrics mới cần đúng một mount ghi được.
Cấu hình MCP Client
Gemini CLI / Antigravity
Thêm vào ~/.gemini/antigravity/mcp_config.json:
{
"understand-anything": {
"command": "uv",
"args": ["--directory", "/đường/dẫn/tuyệt/đối/tới/Understand-Anything-MCP", "run", "server.py"],
"env": {
"PROJECT_ROOTS": "/đường/dẫn/tới/dự-án-a,/đường/dẫn/tới/dự-án-b"
}
}
}Claude Desktop
Thêm vào claude_desktop_config.json:
{
"mcpServers": {
"understand-anything": {
"command": "uv",
"args": ["--directory", "/đường/dẫn/tuyệt/đối/tới/Understand-Anything-MCP", "run", "server.py"],
"env": {
"PROJECT_ROOTS": "/đường/dẫn/tới/dự-án"
}
}
}
}Cursor / Các MCP Client khác
Sử dụng cùng cấu trúc — đặt command là uv, truyền đường dẫn server qua --directory, và cấu hình PROJECT_ROOTS trong env.
Danh sách Tools (17 tools)
Khám phá & Tổng quan
Tool | Mô tả |
| Liệt kê tất cả dự án đã đăng ký kèm số lượng node/edge và thông tin domain |
| Thống kê toàn diện: phân bố type, layers, phân tích độ mới của graph |
| Snapshot JSON có cấu trúc: counts, graph commit, repository HEAD, freshness (bản machine-readable của |
| Tour hướng dẫn dự án — các điểm dừng được chọn lọc giải thích các thành phần chính |
Truy vấn Code Graph
Tool | Mô tả |
| Tìm kiếm mờ có trọng số theo từ khóa. Hỗ trợ lọc |
| Chi tiết đầy đủ của một node theo ID: đường dẫn, layer, độ phức tạp, tags, số lượng quan hệ |
| Đọc mã nguồn thực tế của node. Trích xuất symbol-level đa ngôn ngữ (Java/Kotlin/TS/Python/Go/...) |
| Tất cả node liên kết kèm loại quan hệ. Class/function tự động kế thừa edge từ file cha |
| Cây gọi hàm BFS từ một function (theo edge |
| Liệt kê các tầng kiến trúc hoặc lấy tất cả node trong một layer cụ thể |
| Các function không được gọi bởi function khác — tiềm năng là API endpoint |
| Vùng ảnh hưởng: tất cả node bị ảnh hưởng nếu node này thay đổi (BFS ngược) |
Truy vấn nâng cao
Tool | Mô tả |
| Tìm đường đi ngắn nhất giữa hai node (BFS vô hướng, tối đa 10 hop) |
| Cây kế thừa extends/implements — hỗ trợ hướng |
| Tìm node theo pattern đường dẫn file (O(P) qua path index, case-insensitive) |
Truy vấn Domain Graph
Tool | Mô tả |
| Tổng quan tất cả domain nghiệp vụ kèm flows, thực thể, và mô tả |
| Chi tiết sâu về một domain: thực thể, quy tắc nghiệp vụ, flows, steps, code cross-ref |
| Deep-dive vào một flow cụ thể: entry point, ordered steps, code cross-references |
Skills
Thư mục skills/ chứa các Claude Code skill tương tác với server này.
codebase-explain
Giải thích sâu một file, symbol, module, class, function hoặc business flow bằng evidence read-only từ server — không đọc source local, không bịa node ID/path/line.
/codebase-explain [project-name] [file-path|symbol|module|business-flow]Skill quy định:
Freshness gate — luôn kiểm tra
get_graph_statsvà gánFRESH|STALE|UNKNOWNtrước mọi claim quan trọng.Exact-match validation — kết quả fuzzy chỉ là candidate; phải khớp đúng path/symbol/flow name mới được deep dive, nếu không chuyển sang ambiguity review.
9-section output — output tiếng Việt có cấu trúc, mọi claim gắn
Source/Project/Freshness/Tool/Claim.Ambiguity gate — target mơ hồ sinh file review HTML thay vì đoán.
Skill là markdown thuần — thêm vào
.claude/skills/của project hoặc cài làm plugin để dùng/codebase-explain.
Kiến trúc
flowchart TD
Client["MCP Client<br/>Gemini CLI · Claude · Cursor"]
subgraph Server["server.py"]
FastMCP["FastMCP · 17 tools<br/>list_projects · query_nodes · find_impact<br/>find_path · get_class_hierarchy · get_domain_flow_detail · ..."]
Registry["Multi-Project Registry<br/>cache theo mtime · tự động reload · resolve"]
end
subgraph Loader["kg_loader.py"]
direction TB
DataLayer["Tầng Dữ liệu<br/>Node · Edge · LayerInfo · TourStop<br/>DomainNode · DomainEdge · ProjectGraph"]
EdgeRes["Edge Resolution Layer<br/>class/function → file edge inheritance<br/>O(1) node index · O(degree) edge index"]
Query["Query Engine<br/>fuzzy search · BFS traversal · impact analysis<br/>shortest path · class hierarchy · path search"]
Source["Source Extraction<br/>brace-counting Java/Kotlin/TS/JS/Go/Rust/C#<br/>indent-tracking Python"]
DataLayer --> EdgeRes --> Query --> Source
end
subgraph UA[".understand-anything/"]
KG["knowledge-graph.json<br/>đồ thị code-level"]
DG["domain-graph.json<br/>đồ thị nghiệp vụ"]
Meta["meta.json<br/>metadata phân tích"]
end
Client -->|"stdio · MCP Protocol"| Server
FastMCP --> Registry
Registry --> DataLayer
Source -->|"đọc JSON"| KG
Source -.->|"đọc JSON"| DG
Source -.->|"đọc JSON"| MetaCấu trúc tệp
Understand-Anything-MCP/
├── server.py # MCP server — định nghĩa 17 tools, registry đa dự án
├── kg_loader.py # Bộ tải graph & query engine — data models, search, traversal, resolution
├── metrics.py # Usage metrics — 1 JSON line / tool call, rotating file, fail-safe
├── pyproject.toml # Cấu hình dự án — dependencies: mcp[cli], rapidfuzz, pytest (dev)
├── Dockerfile # Build đa tầng, chạy non-root, có sẵn git cho check_freshness
├── compose.example.yaml # Mẫu compose — chép thành compose.yaml rồi sửa đường dẫn
├── .dockerignore # Loại .venv/, tests/, cache ra khỏi build context
├── scripts/ # Bộ script vận hành — clone, pull, re-index, gitignore
│ ├── clone-repos.sh # Clone repo từ manifest CSV vào REPO_ROOT (idempotent)
│ ├── git-pull.sh # Pull toàn bộ repo + report JSON
│ ├── git-pull-run.sh # Wrapper systemd: lưu JSON, alert webhook
│ ├── sync-graph.sh # Re-index graph incremental bằng claude agent trong docker
│ ├── sync-graph-run.sh # Wrapper cron: pull + sync + alert
│ ├── check-graph-ignore.sh # Kiểm tra .understand-anything/ được ignore đúng
│ ├── revert-gitignore-graph.sh # Hoán .gitignore sang .git/info/exclude
│ └── test/ # Harness test (git repo giả + docker giả)
├── skills/ # Claude Code skills
│ └── codebase-explain/
│ └── SKILL.md # Giải thích sâu codebase bằng evidence read-only
├── tests/ # Bộ test tự động
│ ├── test_kg_loader.py # Unit tests cho core loader, query engine & cross-ref
│ ├── test_graph_metadata.py # Tests cho get_graph_metadata
│ ├── test_path_safety.py # Tests cho path containment
│ ├── test_metrics.py # Unit tests cho metrics writer
│ ├── test_metrics_integration.py # Wiring metrics vào FastMCP tool surface
│ ├── test_symbol_coverage.py # Tests cho compute_symbol_coverage
│ └── fixtures/ # Dữ liệu test JSON mẫu
│ ├── knowledge-graph.json
│ └── domain-graph.json
├── uv.lock # Dependencies đã khóa phiên bản
└── README.mdBiến môi trường
Biến | Bắt buộc | Mô tả |
| Có | Danh sách đường dẫn tuyệt đối phân cách bằng dấu phẩy tới các dự án có thư mục |
| Không | Danh sách đường dẫn tới thư mục gốc của thư viện upstream/dùng chung (để resolve source code của upstream node) |
| Không | Đường dẫn file JSONL cho usage metrics. Rỗng = disable hoàn toàn (mặc định). Xem section Usage Metrics |
Usage Metrics
Module metrics.py đo usage của tool surface — 1 JSON line cho mỗi tool call, append vào file rotating có size cap. Dữ liệu trả lời ba câu hỏi:
Adoption — ua-mcp có thực sự được dùng không? Tool nào được gọi, bao nhiêu lần?
Điểm yếu — Chỗ nào trả về kết quả rỗng, lỗi, hay tool nào không ai gọi (dead tool)?
Hỏi lặp — Cùng một caller có đang hỏi cùng một câu hỏi không? (detection qua
caller + arg_hashtrong time window)
Thiết kế an toàn
Hard rule: ghi metrics không bao giờ được phá tool call. Mọi failure path đều được swallow (file không ghi được, disk full, JSON không serialize được), và writer tự disable vĩnh viễn sau 5 lần lỗi liên tiếp — không còn retry, không còn log spam, tool call chạy tiếp bình thường.
Caller key — hash
ip + user_agent, không lưu IP raw (tránh PII)Arg hash — SHA-256 của
(tool, args), args dài được truncate trước khi ghi nhưng hash vẫn tính trên bản đầy đủOutcome classification — phân loại
ok/empty/error/exceptiondựa trên giá trị trả vềRotating file — size cap, không tăng vô hạn
Kích hoạt
# Mặc định: metrics TẮT (không ghi gì)
PROJECT_ROOTS=/đường/dẫn/dự-án uv run server.py
# Bật metrics: set UA_MCP_METRICS_FILE
UA_MCP_METRICS_FILE=/var/log/ua-mcp/metrics.jsonl \
PROJECT_ROOTS=/đường/dẫn/dự-án uv run server.pyWiring
server.py gọi metrics.install(mcp) trước tool đầu tiên được khai báo bằng @mcp.tool(). Vì decorator chạy khi import theo thứ tự source, tool nào khai báo trên dòng install sẽ không bị đo — test test_every_registered_tool_is_instrumented bảo vệ invariant này.
# Chạy test metrics
uv sync --group dev
uv run pytest tests/test_metrics.py tests/test_metrics_integration.py -vCách hoạt động
Khi khởi động, server quét
PROJECT_ROOTSvà tảiknowledge-graph.json+domain-graph.jsontừ thư mục.understand-anything/của mỗi dự án.Index được xây dựng trong bộ nhớ:
_node_index: tra cứu node theo ID — O(1)_edges_by_source/_edges_by_target: tra cứu edge — O(degree)_domain_edges_by_source: index riêng cho domain graph_nodes_by_path: ánh xạ file_path → nodes — O(1), dùng cho cross-ref và path searchLayer enrichment: gán
layervào từng node dựa trên ánh xạ layer
Edge Resolution Layer — Khi truy vấn quan hệ của class/function node:
Resolve tới parent file qua edge
containsKế thừa outgoing edges từ file cha (imports, contains, v.v.)
Loại bỏ self-reference và deduplicate
Khi một tool được gọi, server kiểm tra mtime của file graph trên đĩa và tự động tải lại nếu cần.
Tìm kiếm mờ sử dụng
rapidfuzzvới điểm số có trọng số — kết quả khớp tên được đánh trọng số cao gấp 3 lần so với khớp mô tả, kèm bonus cho khớp chính xác chuỗi con.Trích xuất mã nguồn đa ngôn ngữ — Tự động nhận diện ngôn ngữ qua extension và chọn chiến lược phù hợp:
Brace-counting: Java, Kotlin, TypeScript, JavaScript, Go, Rust, C#
Indent-tracking: Python (word-boundary regex, shallowest-indent preferred)
Domain↔Code Cross-reference —
resolve_domain_to_code()bridge domain steps tới code nodes:Strategy 1: Exact file_path match qua
_nodes_by_pathindex (O(1))Strategy 2: Directory prefix match với semantic ranking — khi
filePathtrỏ vào package directory:Collect tất cả class/file nodes trong package (không early exit)
Scoring: +20 cho tên token khớp summary, +15 khớp step name, +10 khớp tags, +50 cho full class name match
Penalty: −50 cho boilerplate patterns (
Application,Config,Interceptor,Test,Utils, v.v.)Bonus: +2/level cho files nằm sâu trong subdirectory (thường cụ thể hơn)
Priority: class > file > function
Domain edge type constants —
DOMAIN_REL_CONTAINS_FLOW,DOMAIN_REL_FLOW_STEP, v.v. — single source of truth, tránh typoKiểm tra độ mới chạy lệnh
git diff <commit_phân_tích>..HEADđể phát hiện số lượng file code đã thay đổi kể từ lần tạo graph gần nhất.
Vận hành đồ thị (scripts/)
Bộ script trong scripts/ giúp vận hành graph ở quy mô nhiều repo trên một server — clone, pull, re-index, và giữ git status sạch. Tất cả script:
Mặc định dry-run khi cần ghi — phải truyền
--applymới thực thi.JSON ra stdout, log người đọc ra stderr — parse được bằng
jq, logtail -fđược.Không ghi gì vào repo sản phẩm — graph là runtime state, ignore qua
.git/info/exclude(per-clone, sống qua mọi lần pull).Chạy được trên macOS (bash 3.2) và Linux — harness test trong
scripts/test/không cần VM, docker thật, hay LLM.
Kịch bản điển hình
# 1. Clone repo theo manifest CSV vào REPO_ROOT
./scripts/clone-repos.sh --apply
# 2. Pull toàn bộ repo (git-pull.sh) rồi re-index graph incremental (sync-graph.sh)
./scripts/sync-graph-run.sh
# 3. Kiểm tra .understand-anything/ được ignore đúng cách
./scripts/check-graph-ignore.sh --fixCác script
Script | Chức năng |
| Clone các repo trong |
| Pull toàn bộ repo với |
| Wrapper systemd: chạy |
| Re-index knowledge-graph incremental: đọc |
| Wrapper cron: pull + sync, alert khi có repo cần can thiệp. |
| Kiểm tra 3 trạng thái |
| Hoàn tác sửa tay |
Biến môi trường chính
Biến | Mặc định | Ý nghĩa |
|
| Manifest |
|
| Thư mục chứa các repo con |
|
| Danh sách repo bỏ qua, 1 dòng 1 tên |
|
| Docker image chứa claude CLI + plugin understand-anything |
|
| Docker network agent dùng để gọi LLM API |
| — | Kết nối LLM (script không quan tâm model nào, chỉ cần CLI tương thích |
|
| Timeout từng bước (index / rebuild / domain) |
|
| Bỏ qua repo có số file đổi vượt ngưỡng |
|
| Ngôn ngữ summary trong graph |
| rỗng | Webhook nhận JSON khi có repo lỗi |
Harness test
scripts/test/sync-graph-test.sh tạo repo git giả + docker giả (trong scripts/test/bin/) để chạy hết các nhánh kết quả của sync-graph.sh không cần VM, container thật, hay LLM. Các case tương ứng các sự cố thực tế đã gặp (agent thoát 0 nhưng không ghi meta, stderr lẫn vào stream-json, timeout, bước domain bị bỏ trong báo cáo).
./scripts/test/sync-graph-test.sh # pass=N fail=0Ví dụ sử dụng
Sau khi kết nối với MCP client, AI có thể sử dụng các tool một cách tự nhiên:
Người dùng: "Luồng xác thực hoạt động như thế nào?"
AI sử dụng: query_nodes(query="authentication") → tìm các node liên quan
AI sử dụng: get_domain_detail(domain_name="authentication") → lấy thông tin domain đầy đủ
AI sử dụng: trace_call_chain(start_node_id="...loginUser") → truy vết cây gọi hàmNgười dùng: "Nếu tôi thay đổi PaymentService thì ảnh hưởng gì?"
AI sử dụng: query_nodes(query="PaymentService") → tìm node
AI sử dụng: find_impact(node_id="...PaymentService") → phân tích vùng ảnh hưởngNgười dùng: "PaymentService kế thừa từ class nào?"
AI sử dụng: query_nodes(query="PaymentService") → tìm node
AI sử dụng: get_class_hierarchy(class_id="class:PaymentService", direction="up") → cây kế thừaNgười dùng: "AuthService và PaymentGateway liên quan thế nào?"
AI sử dụng: find_path(source_id="class:AuthService", target_id="class:PaymentGateway") → đường đi ngắn nhấtNgười dùng: "Tất cả file trong package transfer?"
AI sử dụng: search_by_file_path(path_pattern="transfer", node_type="file") → danh sách fileNgười dùng: "Luồng xử lý lương chi tiết thế nào?"
AI sử dụng: get_domain_flow_detail(flow_name="payroll") → entry point, ordered steps, code refsPhát triển
# Cài đặt dependencies
uv sync
# Chạy unit tests
uv run pytest tests/ -v
# Chạy test với MCP Inspector
PROJECT_ROOTS=/đường/dẫn/tới/dự-án npx @modelcontextprotocol/inspector uv run server.py
# Log được ghi ra stderr (stdout được dành riêng cho MCP stdio protocol)Giấy phép
MIT
Được xây dựng cho hệ sinh thái Understand-Anything
Giúp trợ lý AI hiểu sâu bất kỳ codebase nào 🚀
Available Tools
18 toolsfind_entry_pointsA
Find functions that are NOT called by any other function (potential API endpoints / entry points).
Args: project: Project name.
Returns: List of entry point functions with their layer and summary.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 does disclose the core behavior (finding uncalled functions) and the return structure (list with layer and summary), but it does not mention whether it's read-only, any side effects, or performance implications. Without annotations, this is a moderate level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: one sentence for purpose, then clear Args/Returns sections. Every word earns its place, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and an output schema, the description fully explains what it returns. It doesn't define 'layer' or specify sorting/limits, but these are likely domain-specific and not critical for a basic query tool. It is complete enough for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no description in the schema property), but the description provides 'project: Project name' which clarifies the parameter's meaning. Since this is the only parameter and its purpose is straightforward, the semantic addition is minimal but sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Find functions that are NOT called by any other function', which is a specific verb+resource+scope. It distinguishes this tool from siblings like trace_call_chain or find_impact by focusing on uncalled functions as potential entry points.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (when seeking entry points) but does not explicitly compare to alternatives or state when not to use it. It lacks clear exclusionary or alternative guidance, so it earns a 3 for implied usage rather than explicit direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_impactA
Blast radius analysis: find all nodes that would be affected if this node changes.
Follows incoming imports, calls, extends, and implements edges in reverse.
Args: node_id: Node ID to analyze impact for. max_depth: Max traversal depth (default 3, max 10). project: Project name.
Returns: List of affected nodes grouped by depth level.
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| project | No | ||
| max_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 explains the traversal direction and edge types, which is useful, but it does not mention how cycles are handled, whether the input node itself is included in results, or performance implications for deep traversals. This is partially transparent but leaves several corner cases unaddressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a one-sentence purpose, a brief algorithm note, and a clear Args/Returns section. Every sentence provides relevant information with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, algorithm, parameters, and return shape, and an output schema exists to detail exact return values. Minor gaps such as cycle handling, self-inclusion, and explicit when-to-use guidance prevent a perfect score, but overall it is complete for a query tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description's Args section is essential and does add meaningful context. It explains node_id, max_depth (including default and max), and project by name. However, project is only described as 'Project name' without elaborating on its filtering role, and max_depth's behavior at bounds is unspecified, so it is not fully thorough.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: blast radius analysis to find all nodes affected by a change. It specifies the traversal semantics (following incoming imports, calls, extends, and implements edges in reverse), which distinguishes it from sibling tools like trace_call_chain or find_path.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for impact analysis via 'Blast radius analysis', but it does not explicitly state when to use this tool versus alternatives or provide exclusions. No direct comparison to sibling tools is given, so guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_pathA
Find the shortest path between two nodes in the knowledge graph.
Uses undirected BFS — traverses both outgoing and incoming edges. Useful for understanding how two components are connected.
Args: source_id: Starting node ID. target_id: Destination node ID. max_depth: Maximum path length (default 6, max 10). project: Project name.
Returns: Path from source to target showing each hop and relation.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| max_depth | No | ||
| source_id | Yes | ||
| target_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses a key behavioral trait: 'Uses undirected BFS — traverses both outgoing and incoming edges.' This is non-obvious and directly affects results. With no annotations, the description carries the burden, and this detail plus the return description provides meaningful transparency, though it doesn't mention edge cases like no-path scenarios.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: purpose, algorithm, usage, parameters, and return value. It is front-loaded with the main verb and every sentence contributes information. No redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the purpose, algorithm, parameters, and return format. Since an output schema exists, not detailing the return structure is acceptable. However, it omits behavior when no path is found and under-explains the project param, leaving minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It lists each parameter with some meaning: source_id as 'Starting node ID', target_id as 'Destination node ID', max_depth with default and max, and project as 'Project name'. The project description is minimal but present, giving some semantics beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Find the shortest path between two nodes in the knowledge graph', specifying the verb and resource. It doesn't explicitly differentiate from sibling tools like find_impact, but the purpose is specific enough that it likely won't be confused with other tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The line 'Useful for understanding how two components are connected' provides clear context for when to use the tool. It does not mention explicit alternatives or exclusions, but the context is sufficient for basic guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_class_hierarchyA
Show the inheritance hierarchy for a class (extends/implements tree).
Args: class_id: Class node ID to analyze. direction: "up" (parents/supertypes), "down" (children/subtypes), "both". max_depth: Max traversal depth (default 5, max 10). project: Project name.
Returns: Inheritance tree showing parent and child classes with relation types.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| class_id | Yes | ||
| direction | No | both | |
| max_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the return type ('Inheritance tree showing parent and child classes with relation types') but does not mention error behavior, performance implications, or any side effects. This is acceptable for a simple read-only query but lacks richer context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a one-line purpose, a concise parameter list, and a return value note. Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core functionality, parameters, and return value. It lacks usage guidance and edge-case behavior, but the presence of an output schema reduces the need to explain return details in prose, making it reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description compensates by explaining each parameter in the Args section, including direction values, max_depth limits, and project name. This adds meaning beyond the schema, though the 'project' parameter could be described more fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb and resource: 'Show the inheritance hierarchy for a class (extends/implements tree).' This distinguishes it from sibling tools like get_relationships or get_node_detail, which are more generic.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is provided on when to use this tool versus alternatives. The description only explains what it does, leaving the agent to infer its use case from the purpose and parameter names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_domain_detailA
Get detailed info about a specific business domain: entities, rules, flows, steps.
Args: domain_name: Domain name (e.g., "authentication", "transfer", "payroll"). Fuzzy matching supported. project: Project name.
Returns: Full domain details with entities, business rules, flows and their steps.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| domain_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden for behavioral disclosure. It discloses that fuzzy matching is supported for domain_name and states the return structure ('Full domain details with entities, business rules, flows and their steps'), giving the agent a clear expectation of the read-only nature and output. It does not mention side effects or edge cases, but for a simple getter this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-organized with an opening summary, an Args section, and a Returns section. Every sentence adds value: the summary explains what the tool does, the args explain parameters with examples, and the returns sets expectations. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With a simple 2-parameter interface, an output schema, and a description that covers both the purpose and return payload, the description is complete for the agent's invocation needs. The project parameter's optionality is implied by the schema default, and the description's examples help disambiguate domain_name.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only titles (0% description coverage), but the description compensates fully. It explains domain_name with concrete examples ('authentication', 'transfer', 'payroll'), notes fuzzy matching, and clarifies project as 'Project name.' This adds meaning far beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Get detailed info about a specific business domain' and enumerates the included content: 'entities, rules, flows, steps.' This is a specific verb+resource+scope, and the enumeration clearly distinguishes it from siblings like get_domain_overview or get_domain_flow_detail by emphasizing 'detailed' and listing all components.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving a full domain model with fuzzy matching on the domain name. It does not explicitly mention alternatives or when-not-to-use, but the context ('detailed info') and the enumerated contents provide clear guidance on when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_domain_flow_detailA
Deep-dive into a specific business flow: entry point, all steps with ordering, and linked code nodes for each step.
Use this for detailed understanding of a single flow's implementation. For an overview of all domains/flows, use get_domain_overview or get_domain_detail.
Args: flow_name: Flow name (e.g., "SAGA Xử lý Lương", "init payroll", "recovery retry"). Fuzzy matching supported. project: Project name.
Returns: Full flow details with entry point, ordered steps, step summaries, and cross-referenced code nodes for each step.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| flow_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that fuzzy matching is supported for flow_name, describes the return content (entry point, ordered steps, step summaries, cross-referenced code nodes), and implies a read-only, non-destructive operation. It could add more about pagination or error behavior, but for a query tool it provides solid context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well organized: a one-sentence purpose, a usage section with sibling differentiation, and clearly labeled Args/Returns sections. Every sentence contributes useful information with no redundancy, and the most important info is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has only two parameters, an output schema, and moderate complexity, the description is complete. It explains what the tool returns, how to get broader context via siblings, and the semantics of the key parameter. The presence of an output schema reduces the need to detail return structure, and the description covers everything else needed for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although schema description coverage is 0%, the description adds meaningful value for flow_name through examples ('SAGA Xử lý Lương', 'init payroll') and explicitly notes fuzzy matching. It also explains project as simply 'Project name', which is minimal, but the main parameter is well covered. This largely compensates for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description begins with a specific verb phrase 'Deep-dive into a specific business flow' and precisely lists what is returned: entry point, ordered steps, and linked code nodes. It explicitly contrasts with sibling tools get_domain_overview and get_domain_detail, making its unique role clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It directly states when to use the tool ('Use this for detailed understanding of a single flow's implementation') and names alternatives for broader overviews ('For an overview of all domains/flows, use get_domain_overview or get_domain_detail'). This gives explicit when and when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_domain_overviewB
Get summary of all business domains and their flows (from domain-graph.json).
Args: project: Project name.
Returns: List of domains with flow names, entity counts, and summaries.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior itself. It states this is a read operation that fetches data from domain-graph.json and returns a list of domains with flows, entity counts, and summaries, which covers basic behavior. However, it doesn't mention potential performance implications, error behavior for unknown projects, or any prerequisites.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, using one sentence for purpose and a simple Args/Returns breakdown for the rest. There is no redundant text, and the structure is easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description captures the core purpose, input, and output, making the tool understandable at a glance. However, it lacks usage context and enriched parameter detail, and with an output schema already available, the returns section adds little. Overall, it's sufficient for a simple overview tool but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must compensate for the single parameter. It only provides 'project: Project name,' which adds minimal semantic meaning beyond the schema's property name. It doesn't clarify what a project name refers to, whether it must match a specific format, or what happens if it's null.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as retrieving a summary of all business domains and their flows, specifying the source file and output contents. It distinguishes itself from detail-oriented siblings by using 'overview' and 'all domains,' though it doesn't explicitly recommend against using detail tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus get_domain_detail or get_domain_flow_detail. The description does not include use cases, exclusions, or alternative tool mentions, leaving the agent to infer from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_graph_metadataA
Structured JSON snapshot of a project's graph state: identity, node/edge counts, graph commit, repository HEAD and freshness. Machine counterpart of get_graph_stats — parse it instead of the text output.
Args: project: Project name. Leave empty if only one project is loaded.
Returns: JSON string: {"ok": true, ...metadata} or {"ok": false, "error": {"code", "message", "remediation"}}.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 output format (JSON string with ok/error structure), including error code/message/remediation, and explains project handling. The 'snapshot' wording implies a read-only operation, though it does not explicitly state 'read-only' or side-effect-free. This is a minor gap but the description otherwise provides solid behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a concise opening sentence, an Args section, and a Returns section. Every sentence adds value, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a single optional parameter and an output schema available, the description covers the return format, error handling, and parameter behavior. It even provides a usage alternative. The tool's simplicity is fully matched by the description's completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully compensates by explaining the project parameter: 'Project name. Leave empty if only one project is loaded.' This adds meaning beyond the bare schema definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Structured JSON snapshot of a project's graph state' and lists specific contents: identity, node/edge counts, graph commit, repository HEAD, freshness. It also differentiates from the sibling get_graph_stats by calling it the 'Machine counterpart' and saying 'parse it instead of the text output.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly names get_graph_stats as the alternative and instructs to use this tool for machine parsing instead of text output. Also provides project parameter usage guidance: 'Leave empty if only one project is loaded.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_graph_statsB
Get comprehensive statistics about a project's knowledge graph.
Args: project: Project name. Leave empty if only one project is loaded.
Returns: Statistics: node/edge counts, type distributions, top domains, layers. Includes FRESHNESS ANALYSIS: whether the graph is up-to-date with the current codebase (uses git diff against the commit when the graph was last analyzed).
| Name | Required | Description | Default |
|---|---|---|---|
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 does reveal an important behavior: the freshness analysis uses git diff against the commit when the graph was last analyzed, which implies a potentially expensive operation. It also lists what statistics are returned. However, it does not mention whether the tool is read-only, potential side effects, or any computational cost or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear Args and Returns sections, and it front-loads the core purpose in the first sentence. It is a bit verbose with the freshness analysis explanation, but every sentence adds value and there is no redundant fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple with one optional parameter and an output schema exists, so the description covers the basic return contents. However, it lacks guidance on how this tool relates to siblings (especially get_graph_metadata) and does not address potential costs or operational nuances of the git diff-based freshness check. This leaves some context gaps for an agent deciding whether to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no description for the 'project' parameter (0% coverage), so the description's parameter explanation is essential. The description clearly explains that 'project' is a project name and that leaving it empty is valid when only one project is loaded, which adds meaningful semantics beyond the schema's bare type information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Get') and resource ('project's knowledge graph'), and adds scope details (comprehensive statistics, freshness analysis). However, it does not distinguish itself from the sibling tool 'get_graph_metadata', which likely has overlapping functionality, so it falls short of full differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus alternatives like get_graph_metadata or query_nodes. It implies usage for statistics gathering but provides no exclusions, prerequisites, or comparative context. This leaves the agent without clear selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_layer_infoA
List architectural layers, or get nodes belonging to a specific layer.
Args: layer_name: Layer name to inspect. Leave empty to list all layers. project: Project name.
Returns: Layer listing or nodes within a specific layer.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| layer_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 explains the effect of layer_name (empty vs specified) and the return type (layer listing or nodes), but does not disclose behavior when project is empty or mention prerequisites, leaving some ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a compact docstring with clear Args and Returns sections, no redundant prose, and the primary purpose is front-loaded. Every line contributes meaningfully.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has only two optional parameters and an output schema exists, but the description misses important edge-case behavior: what happens if project is left empty, and how project and layer_name interact (e.g., listing layers for a specific project). These gaps prevent full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. layer_name is well described with a conditional behavior ('Leave empty to list all layers'), but project is only described as 'Project name,' which adds little beyond the schema title and does not clarify optionality or interaction with layer_name.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List architectural layers, or get nodes belonging to a specific layer,' providing a specific verb and resource. This distinguishes it from sibling tools like query_nodes and get_graph_metadata by focusing on layer-level operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool: listing all layers when layer_name is empty, or inspecting nodes in a specific layer. However, it does not explicitly name alternatives or state when not to use this tool, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_node_detailA
Get full details of a specific node by its ID.
Args: node_id: Unique node ID (e.g., "upstream:function:src/auth/login.ts::loginUser"). Use query_nodes to find IDs. project: Project name. Leave empty if only one project.
Returns: Complete node details including path, layer, tags, complexity.
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the return content ('Complete node details including path, layer, tags, complexity') and implies a read-only operation via 'Get'. However, it does not mention error behavior, authentication, or rate limits, leaving some transparency gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured with Args and Returns sections. The opening sentence states the purpose, the example adds immediate clarity, and every line contributes useful information without padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple (2 parameters, output schema present), and the description covers the essential semantics, return content, and ID-finding workflow. It is complete enough for an agent to invoke correctly, though it could mention error cases or multi-project disambiguation more explicitly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no parameter descriptions (0% coverage), but the description fully compensates: node_id is explained with a concrete example ('upstream:function:src/auth/login.ts::loginUser') and pointer to query_nodes, while project is clarified with a conditional rule. This adds significant meaning beyond the bare schema fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get full details of a specific node by its ID,' which identifies the action (get), resource (node), and scope (specific node). This distinguishes it from siblings like query_nodes (search) and get_node_source (source code retrieval).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: it instructs to 'Use query_nodes to find IDs' and explains the project parameter's conditionality ('Leave empty if only one project'). It does not explicitly exclude alternatives, but it gives actionable when-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_node_sourceA
Get the actual source code for a knowledge graph node.
For function/class nodes: extracts just the method or class block with annotations. For file/config nodes: returns the whole file content (truncated if too large). Includes line numbers for easy reference.
Args: node_id: Node ID (use query_nodes to find IDs). max_lines: Max lines for whole-file reads (default 200). Does not affect function/class extraction. project: Project name.
Returns: Source code with line numbers, file path, and extraction metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| project | No | ||
| max_lines | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of transparency. It discloses node-type-specific extraction behavior, truncation for large files, inclusion of line numbers, and the effect of max_lines on whole-file reads. This is strong, but it does not mention failure modes or whether the operation is strictly read-only (though implied by 'Get'), so a 4 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an opening sentence, a short behavioral breakdown, labeled arguments, and a returns note. Every sentence earns its place, and the format is easy to scan without being bloated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 parameters, no annotations, no schema descriptions, and no output schema. The description covers purpose, behavior by node type, parameter semantics, and return format. It gives the agent enough context to correctly invoke the tool without needing additional lookup.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameter descriptions, so the description fully compensates. It explains node_id as an ID to be found via query_nodes, max_lines as a limit for whole-file reads that does not affect function/class extraction, and project as the project name. This adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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: 'Get the actual source code for a knowledge graph node.' It further distinguishes behavior for function/class vs file/config nodes, which clearly separates it from sibling tools like get_node_detail or query_nodes that serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clear context is provided: use this tool when you need the actual source code for a node. The description also tells the agent to use query_nodes to find IDs, which is a helpful cross-reference. However, it does not explicitly mention when to avoid this tool or name alternative tools for metadata-only needs, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_relationshipsA
Get all nodes connected to a given node, with relationship types.
Args: node_id: Node ID to inspect. direction: "out" (this node calls/imports others), "in" (others call/import this), "both". relation_filter: Filter by relation: "calls", "imports", "contains", "implements", "extends". Leave empty for all. project: Project name.
Returns: List of relationships in format: "source --[relation]--> target".
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| project | No | ||
| direction | No | both | |
| relation_filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It does well by explaining direction semantics (e.g., 'out' means this node calls/imports others) and enumerating valid relation_filter values, which adds behavioral context beyond the bare schema. Yet it does not explicitly state that this returns only direct/first-degree relationships, nor mention any limits like pagination, so it is not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently organized: a one-sentence summary, then a clear argument list with inline documentation, and a return format specification. There is no filler or repetition. All content is purposeful and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 params, 1 required, no annotations), the description covers parameters, direction semantics, and return format. It omits edge-case behavior such as invalid node IDs or empty results, and does not explicitly state this is a read-only operation, but the 'Get' wording implies it. Overall, it is sufficient for an agent to use correctly in most cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully compensate. It does: every parameter (node_id, direction, relation_filter, project) is documented with its meaning and allowed values. Direction and relation_filter get particularly thorough explanation, covering all enum-like options. This far exceeds what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get all nodes connected to a given node, with relationship types.' The verb 'get' is specific, the resource (connected nodes with relationship types) is explicit, and the scope (direct relationships) is implied by the direction parameter semantics. This distinguishes it from sibling tools like find_path or trace_call_chain, which explore larger structures.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when the tool is appropriate (inspecting a node's direct connections) through its parameter explanations. However, it does not explicitly state when not to use it or mention alternative tools, such as find_path for paths or trace_call_chain for call chains. This meets the 'clear context' bar 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.
get_tourA
Get the guided project tour — a curated walkthrough of the most important parts of the codebase.
Tour stops are ordered sequences that explain the project's key components, each linking to specific nodes in the knowledge graph.
Args: stop_index: Specific tour stop number (1-based) to expand with full node details. Leave empty to list all stops. project: Project name.
Returns: Tour overview or detailed stop with linked nodes.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| stop_index | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses useful behavioral details: tour stops are ordered sequences linking to knowledge graph nodes, stop_index is 1-based, and leaving it empty lists all stops while specifying expands with full node details. It also states the return format, providing good transparency for a read-only tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is succinct: a two-sentence intro followed by structured Args and Returns sections. Every sentence adds value—defining the tour concept, explaining the parameter behaviors, and outlining return types. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with only two optional parameters, and an output schema exists, so return values are covered. The description explains the core behavior well. However, it lacks any mention of prerequisites, project selection context, or edge cases, which would make it more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides no descriptions for the two parameters (0% coverage). The description compensates well by explaining stop_index as a 1-based number with a specific behavior when empty, and project as the project name. This adds meaning beyond the schema, though it could clarify what happens when project is omitted (default null).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a guided project tour—a curated walkthrough of important codebase parts. The verb 'get' and resource 'tour' are specific, and this distinguishes it from sibling graph/query tools like query_nodes or get_domain_overview.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use this tool: when you want a high-level curated overview or a detailed stop. It explains the stop_index behavior (empty to list all, specify to expand), but does not explicitly mention alternatives or exclusion conditions among the many sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_projectsA
List all registered projects with basic statistics.
No parameters required. Call this first to see available projects.
Returns: List of projects with node/edge counts and domain info.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 states that no parameters are required and that it returns node/edge counts and domain info, implying a safe, read-only list operation. However, it does not disclose any potential caveats like pagination, data freshness, or whether projects can be empty, so it only meets the basic standard.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three short sentences, each serving a clear purpose: describing the function, noting the lack of parameters, and stating the return value. There is no wasted wording or redundancy, and the main action is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no parameters and an existing output schema, the description is complete. It tells the agent when to call it (first), what it does, and what it returns, which is sufficient to decide when and how to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, and the description explicitly says 'No parameters required.' With no parameters to explain, the baseline for a 0-parameter schema is 4, and the description appropriately adds no unnecessary detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description begins with 'List all registered projects with basic statistics,' clearly stating a specific action and resource. It also notes that this should be called first, which distinguishes it from sibling tools by positioning it as the entry point to discover projects.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance to 'Call this first to see available projects,' indicating this is the initial contact point. It implies that the agent should use this before exploring graph-specific tools, but it does not name alternatives or exclusion criteria, so it lacks the explicit when-not-to-use guidance for a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_nodesA
Search for nodes in the knowledge graph by keyword (weighted fuzzy matching).
Scoring: name (3x weight) > summary (1.5x) > tags (1x). Exact name matches get a bonus. Supports pagination via offset/limit.
Args: query: Search keyword (e.g., "authentication", "login", "PaymentService"). node_type: Filter by type: "file", "function", "class", "config", "service". Leave empty for all. limit: Max results per page (default 10). offset: Starting offset for pagination (default 0). Use with limit for paging. project: Project name. Leave empty if only one project.
Returns: List of matching nodes with id, type, name, summary, layer, and tags.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| offset | No | ||
| project | No | ||
| node_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries behavioral disclosure. It reveals weighted scoring, exact-match bonuses, and pagination support. It stops short of detailing ordering or empty-result behavior, but provides substantial insight into the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is tightly structured, with a one-sentence summary, scoring details, and a bulleted argument list. Every sentence serves a purpose without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema (which could reduce the need to explain returns), the description still lists the return fields. It covers query syntax, filtering, pagination, and project scoping, making it self-sufficient for an agent to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates fully by explaining each parameter with examples and defaults. It adds meaning beyond the schema types by describing 'node_type' filtering, pagination, and project context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the action ('Search for nodes') and the resource ('knowledge graph'), with a clear keyword-based scope. It distinguishes itself from siblings like search_by_file_path by mentioning weighted fuzzy matching and scoring.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly explains the kind of search (keyword-based, fuzzy matching) and how scoring works, which implies when to use it. However, it does not explicitly mention alternatives or exclusion cases, so it lacks explicit 'when not to use' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_file_pathA
Find nodes by file path pattern (substring match).
Useful for finding all nodes in a package, module, or directory. Case-insensitive.
Args: path_pattern: Substring to match in file paths (e.g., "payroll", "com/vietbank/sme", "auth"). node_type: Optional filter by type: "file", "function", "class". Leave empty for all. limit: Max results (default 30, max 50). project: Project name.
Returns: List of matching nodes sorted by file path.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| project | No | ||
| node_type | No | ||
| path_pattern | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden for behavioral disclosure. It specifies substring matching, case-insensitive behavior, sorting by file path, and result limits (max 50), which are valuable beyond the schema. It does not explicitly note that the operation is read-only, but the search nature implies it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact yet complete: a clear purpose sentence, a usage hint, and organized Args/Returns sections. Each sentence adds value, and the structure makes parameters and return value easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 4-parameter tool with an output schema, the description covers all parameters, return type, and sorting behavior. It could also mention behavior for invalid inputs or empty results, but the description is otherwise comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only parameter names and types with no descriptions (0% coverage). The description compensates by explaining path_pattern with examples, node_type allowed values, limit constraints (default 30, max 50), and project semantics, adding significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool finds nodes by file path pattern using substring matching, providing a specific verb and resource. It gives usage context for locating nodes in packages/modules/directories, but it does not explicitly distinguish from sibling search tools like query_nodes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear use case ('finding all nodes in a package, module, or directory') and adds matching semantics, but it lacks explicit guidance on when not to use this tool or references to alternative sibling tools for other search criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
trace_call_chainA
Trace the function call chain starting from a node (BFS on 'calls' edges).
For class/file nodes: automatically resolves to contained functions and traces call chains from them.
Args: start_node_id: ID of the starting node (function, class, or file). max_depth: Max traversal depth (default 3, max 10). project: Project name.
Returns: Call tree as indented text.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| max_depth | No | ||
| start_node_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 that traversal is BFS-based, that class/file nodes are automatically resolved to functions, and that output is an indented text tree. It also documents max_depth limits. While it doesn't discuss auth or destructive behavior (unnecessary for a read-only trace), it provides substantive algorithmic details beyond the tool's name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a brief purpose statement, followed by Args and Returns sections. Every sentence adds value—there is no fluff. The front-loaded purpose sentence immediately communicates the core function, and the parameter details are formatted for easy parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (graph traversal with special node-type handling), the description is complete. It covers the algorithm, input parameters with defaults, special cases for class/file nodes, and the return format. Despite an output schema existing, the description's note that the result is 'indented text' is sufficient for an agent to understand the outcome. No critical context is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must fully compensate. It does: an Args section explains each parameter (start_node_id, max_depth, project) with types, defaults, and constraints (e.g., max_depth default 3, max 10). This greatly exceeds the bare schema definitions, providing clear semantics for all three parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Trace the function call chain starting from a node (BFS on 'calls' edges).' It uses a specific verb ('trace') and resource ('function call chain'), and specifies the algorithm (BFS on calls edges). This distinguishes it from sibling tools like find_path or find_impact, which focus on different types of graph traversal.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by explaining how it handles different node types and parameters, but it does not explicitly state when to use this tool versus alternatives. There are no direct comparisons or exclusions (e.g., 'for impact analysis use find_impact'). Guidance is implied but not definitive.
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. Dates show when Glama detected each change.
18 tool updates
v0.2.1- First observed
find_entry_points - First observed
find_impact - First observed
find_path - First observed
get_class_hierarchy - First observed
get_domain_detail - First observed
get_domain_flow_detail - First observed
get_domain_overview - First observed
get_graph_metadata - First observed
get_graph_stats - First observed
get_layer_info - First observed
get_node_detail - First observed
get_node_source - First observed
get_relationships - First observed
get_tour - First observed
list_projects - First observed
query_nodes - First observed
search_by_file_path - First observed
trace_call_chain
TDQS
Each tool targets a distinct aspect of the knowledge graph (entry points, stats, node search/detail/source, relationships, layers, domains, flows, impact, paths, hierarchy, file path). The two stats tools are clearly separated by intended audience (human-readable vs machine-readable), so there is no meaningful overlap.
All tool names follow an imperative verb_noun pattern (find_, get_, list_, query_, trace_, search_). The consistent use of snake_case and a predictable verb prefix makes the toolset easy to navigate.
18 tools is slightly above the ideal range, but each tool serves a distinct query need for a code understanding server. The count is justifiable given the breadth of analysis features, though it borders on heavy.
The toolset covers the full lifecycle of codebase exploration: listing projects, searching and inspecting nodes, retrieving source, tracing relationships and call chains, analyzing impact, exploring layers and business domains, and getting guided tours. No obvious gaps for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Ground-truth code graph for your codebase: exact callers, callees, symbols & dependencies.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables AI assistants to analyze codebases through semantic search, call graph generation, and function metadata extraction. Provides real-time code analysis with persistent vector storage for understanding complex code structures and relationships.136-
- FlicenseBqualityNot gradedmaintenanceProvides comprehensive codebase analysis and semantic understanding through integrated knowledge graphs, enabling AI assistants to understand project structure, patterns, dependencies, and context through multiple analysis tools and format generators.9-
- AlicenseAqualityDmaintenanceEnables AI to analyze, query, and manage a graph-based representation of software architecture for impact analysis, dependency tracking, and design.20161AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceProvides AI coding assistants with deep, semantic understanding of local codebases via AST-aware chunking, cross-repo symbol graphs, and architectural memory, enabling context-aware code search and dependency tracing.10MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VIethoangnguyenle/Understand-Anything-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server