investigate
Search code and project knowledge together to return evidence-backed leads for debugging, designing, or modifying source.
Instructions
Find code and project knowledge, with evidence to guide source review.
WHEN TO USE: before investigating, diagnosing, designing or modifying anything. Include a qualified symbol, path, config key, or error text when available. Broad natural-language results are leads. If matches are weak or empty, check index_state and search the repository directly. Read relevant source and tests before making claims or edits. A partial index can omit symbols, and a ready index can still miss relevant results. AFTER THIS: graph(action='impact') if you are about to change a symbol; investigate(action='why', symbol=...) before deleting something load-bearing; record() once you have verified something.
Searches code and knowledge together - lexical, symbol, code graph, memory
graph, anchor status and git history - and returns compact capsules under a
token budget rather than file dumps. Direct matches without a code anchor
can appear in repo_memories. The conversations section is what
past sessions from any coding agent (Codex, Claude Code, Copilot, Cursor,
...) said about the same terms while working in this repository: leads to
follow with conversations(action='get'), not anchored facts.
Actions: search (default) run an investigation. expand drill into a prior investigation without restarting it. verify re-verify anchors for this repository right now. why reconstruct why one symbol exists, as a causal chain: decision -> bug -> failed fix -> accepted fix -> invariant -> test.
Args: query: task in plain language, with any known symbol, path, or exact term. A standalone path:line or path:line:column locates the indexed symbol at that source location. intent: locate | understand | modify | debug | audit. Inferred if omitted. root: primary repository path. Defaults to the server's working directory. roots: explicit repository paths for one bounded multi-repository search. depth: graph expansion hops from the seed set. budget: approximate token ceiling for the returned capsules. find_problems: run targeted checks over the narrowed subgraph. cross_repos: also follow contract edges into other repositories and report their active warnings. Reads the central catalog only, so it works even when those repositories are missing. conversations: also search past agent transcripts scoped to this repository. Off skips the transcript index entirely. use_concepts: use reviewed phrases from .icn-concepts.json. Grounding lists matched phrases, target status, and terms unmapped by the glossary. action: search, expand, or verify. investigation_id: required for expand. focus: what to drill into, for expand. symbol: the symbol to explain, for action="why".
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "investigate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | ||
| depth | No | ||
| focus | No | ||
| query | No | ||
| roots | No | ||
| action | No | search | |
| budget | No | ||
| intent | No | ||
| symbol | No | ||
| cross_repos | No | ||
| use_concepts | No | ||
| conversations | No | ||
| find_problems | No | ||
| investigation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||