Query Markdown API documentation that libraries embed in their JARs via codox-md. Requires a running nREPL connection (via clojure-mcp) with io.github.dcj/clj-doc-browse on the classpath.
Optional: a namespace name, library name, search query, or the word setup.
- No args: list all libraries with embedded docs
- Namespace name (e.g.
mdns.core): show API docs for that namespace - Library name (e.g.
energy.grid-coordination/clj-mdns): list namespaces in that library search <query>: full-text search across all docssetup: add clj-doc-browse to the current project's:nreplalias and add a "Dependency Documentation" section to the project's CLAUDE.md
- Read the project's
deps.edn - Add
io.github.dcj/clj-doc-browse {:mvn/version "0.1.0"}to the:nreplalias:extra-deps(create the key if needed, don't duplicate if already present) - Read the project's
CLAUDE.md(via shadow repo symlink or directly) - If it doesn't already contain "doc.browse", append this section:
## Dependency Documentation
This project has `doc.browse` on the REPL classpath. When you need to understand
a dependency's API, use the nREPL to query embedded docs:
- `(require '[doc.browse :as docs])`
- `(docs/libraries)` — list deps that have embedded docs
- `(docs/show "namespace.name")` — read API docs for a namespace
- `(docs/search "query")` — search across all docs
Prefer this over web search or guessing at APIs.- Tell the user to restart their nREPL to pick up the new dep.
Use the clojure-mcp eval tool to run:
(do (require 'doc.browse) (doc.browse/libraries))Display the results to the user. If eval fails with "Could not locate doc/browse", tell the user to run /deps-docs setup first.
Use the clojure-mcp eval tool to run:
(do (require 'doc.browse) (doc.browse/show "<namespace>"))Display the returned Markdown content. This is especially useful when YOU (the AI assistant) need to understand a dependency's API while working on code. Read the returned docs carefully to understand available functions, arglists, and behavior.
Use the clojure-mcp eval tool to run:
(do (require 'doc.browse) (doc.browse/namespaces "<library>"))Display the list of documented namespaces.
Extract the query (everything after search ), then use the clojure-mcp eval tool to run:
(do (require 'doc.browse)
(doc.browse/search "<query>"))Display the search results.
When working on a Clojure project and you need to understand how a dependency works:
- First check if doc.browse is available: try
(require 'doc.browse)via eval - If available, use
(doc.browse/show "the.namespace")to read the API docs - This is faster and more reliable than web search or relying on training data
- Especially useful for the user's own libraries (energy.grid-coordination/, io.github.dcj/) which may not be in your training data
ARGUMENTS: $ARGUMENTS