Are there any AI agent tools for querying crate's API docs directly (without wasting tokens on source code)?

Hi everyone,

I'm looking for a tool or MCP that lets AI agents query docs.rs or local cargo doc outputs directly.

Right now, when my agents try to learn a crate's API, they search the webpages or raw .rs files (AFAIK). This wastes a massive amount of tokens on irrelevant source code when all they really need are the type signatures and docstrings.

I know agents can rely on text search to navigate source code. But given that rustdoc inherently generates structured data, is there a more standardized interface to query it? My goal is to use this query mode as a foundation to develop higher-level agent skills.

Thanks!

I think I heard of this idea once before, but I don’t recall whether there was an implementation.

The place to start would be rustdoc JSON output — that’s how you get machine-readable data out of rustdoc. You’d then presumably want to process the JSON to turn it into something comprehensible and token-efficient.

1 Like