Declarations, signatures, calls, types, decorators, tests, diagnostics, and source spans through one typed MCP tool.
Do not make the agent read the whole repository.
Most orientation starts as grep, file read, import chase, another grep, and another file read.
@ttsc/graph reads the resident TypeScript-Go compiler session.
@ttsc/graph
tsconfig
Program
A syntax index can infer these edges. The compiler has already proved them.
CheckoutService.place signature place(input: IOrderInput): Promise<IOrder> declared src/checkout/CheckoutService.ts:41-88 calls Inventory.reserve, Payment.authorize testedBy test_checkout_place
inspect_typescript_graph({ question, draft: { type, reason }, review, request, });
The request is a discriminated union. Choosing its type chooses the operation.
type
draft
review
request
Free prose can skip a step. A required schema field cannot.
tour
entrypoints
lookup
trace
details
overview
escape
Use the graph when the answer depends on TypeScript symbols, calls, or types.
Use escape when the answer depends on:
init
Every node is a declaration. Every edge is a compiler-resolved relationship.
This is one person's bounded benchmark. It is not a universal performance guarantee.
Answer quality was manually inspected; free-text matching was not used as an oracle.
small TypeScript project ─┐ medium monorepo ├─ answer-sized graph response 3M-line VS Code ┘
On the three-million-line VS Code fixture:
The published chart adds index readiness and LLM answer time in the order a developer waits.
npm install -D ttsc @ttsc/graph typescript
{ "mcpServers": { "ttsc-graph": { "command": "npx", "args": ["-y", "@ttsc/graph"] } } }
npx @ttsc/graph view
The tool steps aside when its evidence is not the right evidence.
Exact → trusted → done.