How to Look Up Package Docs with OpenClaw
Fetch library documentation with OpenClaw and ToolRouter. Access current npm docs in automation workflows.
ToolLibrary DocsOpenClaw retrieves library documentation as part of automated workflows — check required API signatures before code generation, verify package compatibility information, or build a documentation snapshot as part of a project onboarding process.
Connect ToolRouter to OpenClaw
1Install the CLI
npm install -g toolrouter-mcp2Call tools directly from OpenClaw
toolrouter-mcp call web-search search --query "AI tools"
toolrouter-mcp toolsSteps
Once connected (see setup above), use the Library Docs tool:
- Ask: "Get the documentation for [package name]"
- OpenClaw fetches current docs for the library
- Use the documentation content in a downstream step
- Combine with code generation or project scaffolding tasks
Example Prompt
Try this with OpenClaw using the Library Docs tool
Get the current documentation for the sharp image processing library and extract all the available resize and format conversion methods with their parameter signatures.
Tips
- Use documentation fetching as a precursor step before generating boilerplate integration code
- Fetch docs for multiple packages and compare them to produce a library comparison report
- Extract method signatures to use as context when generating typed wrappers automatically