How to Look Up Package Docs with Copilot

Access library documentation in your IDE with Copilot and ToolRouter. Get current package docs without switching tabs.

Tool
Library Docs icon
Library Docs

Copilot brings live package documentation into your editor session — look up a method signature, check current config options, and write implementation code in the same conversation. No browser required.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

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

  1. In Copilot Chat: "Get the docs for [package name]"
  2. Copilot fetches current documentation
  3. Ask: "Show me the correct way to use [specific method]"
  4. Implement the feature with accurate, current API knowledge

Example Prompt

Try this with Copilot using the Library Docs tool
Get the current docs for the prisma client package and show me how to write a query that fetches all users where the role is "admin" and the createdAt is in the last 30 days.

Tips

  • Ask for docs while you are writing the code that uses the package — stay in flow
  • Request the TypeScript types for a method to get accurate autocomplete in your editor
  • Check docs for packages you have not used recently to confirm API signatures have not changed