How to Look Up Package Docs with OpenClaw

Fetch library documentation with OpenClaw and ToolRouter. Access current npm docs in automation workflows.

Tool
Library Docs icon
Library Docs

OpenClaw 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-mcp
2Call tools directly from OpenClaw
toolrouter-mcp call web-search search --query "AI tools"
toolrouter-mcp tools

Steps

Once connected (see setup above), use the Library Docs tool:

  1. Ask: "Get the documentation for [package name]"
  2. OpenClaw fetches current docs for the library
  3. Use the documentation content in a downstream step
  4. 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