I've been having a small problem. Not a big deal, but annoying enough that it kept bugging me. When working with AI agents on code changes, they sometimes struggle finding the right symbols. I'll give a prompt like "Let's change function cancel_job() to check the current state of the job, and return Error if the job is already completed", and the agent fires up shell scripts - grep commands, find operations, sometimes takes a few tries to locate the exact spot in a complex codebase I'm asking it to change.
Normally? I wouldn't have bothered. Small problem, not worth the time. But with agentic coding, small problems don't take that long anymore. So over a couple of evenings I built cratographer (for those who don't know, a crate is the unit of code packaging in Rust - I'm really proud of that name!): https://github.com/joemag1/cratographer.
Nothing fancy - it's an MCP tool that indexes Rust codebases using rust-analyzer. AI agents can use it to look up where symbols are defined instead of searching through files, just like an IDE would. When an agent needs to find a struct or function, it just queries the index. Simple idea, basic implementation, only works with Rust because that's all I need right now.
The fun part: I built cratographer using cratographer. Once the basic indexing worked, the AI agent building cratographer could use cratographer to navigate its own codebase. That kind of recursive improvement just feels right.
If you're dealing with AI agents that spend too much time hunting for code, check it out. Works well enough for what I need - might help you too.
