2025-12-24 08:57:31 +01:00
|
|
|
---
|
|
|
|
|
description: Fetch up-to-date documentation and code examples for any library
|
2025-12-30 13:57:12 +01:00
|
|
|
argument-hint: <library> [query]
|
2025-12-24 08:57:31 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Context7 Documentation Lookup
|
|
|
|
|
|
2025-12-30 13:57:12 +01:00
|
|
|
Fetch current, version-specific documentation from source repositories.
|
2025-12-24 08:57:31 +01:00
|
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
2025-12-30 13:57:12 +01:00
|
|
|
`$ARGUMENTS` = `<library> [query]`
|
|
|
|
|
|
|
|
|
|
- First word: library name (or direct library ID starting with `/`)
|
|
|
|
|
- Remaining: your specific question or topic
|
2025-12-24 08:57:31 +01:00
|
|
|
|
|
|
|
|
Examples:
|
2025-12-30 13:57:12 +01:00
|
|
|
- `react hooks`
|
|
|
|
|
- `next.js authentication`
|
|
|
|
|
- `/vercel/next.js/v15.1.8 app router`
|
2025-12-24 08:57:31 +01:00
|
|
|
|
|
|
|
|
## Steps
|
|
|
|
|
|
2025-12-30 13:57:12 +01:00
|
|
|
1. Parse arguments: first word = library, remaining = query
|
|
|
|
|
2. If library starts with `/`, use it directly as library ID
|
|
|
|
|
3. Otherwise, call `resolve-library-id` with library name and query
|
|
|
|
|
4. Call `query-docs` with the library ID and query
|
|
|
|
|
5. Present documentation with code examples
|