Context7 documentation lookup
Context7 connects Speedwave to current, authoritative documentation for third-party frameworks, software libraries, and API specifications, preventing outdated model assumptions. The integration operates anonymously out of the box with zero mandatory configuration.
Architecture and execution model
Section titled “Architecture and execution model”Context7 executes within an isolated worker container communicating with https://context7.com/api/v2. The worker operates without credentials by default. If an optional API key is configured, it is stored under ~/.speedwave/tokens/<project>/context7/api_key and mounted into the worker container in read-only mode at /tokens/api_key.
Tool execution follows a two-stage pattern:
resolveLibraryId: Accepts a target library name (such as “react” or “spring-boot”) and user question, returning a ranked list of matched library identifiers.queryDocs: Retrieves relevant documentation sections for the resolved identifier within a declared token budget (default 5,000 tokens, clamped between 500 and 15,000 tokens).
Anonymous lookups are rate-limited to approximately 200 requests per day per IP address. Providing a Context7 API key (ctx7sk_ prefix) elevates rate limits. Upstream 5xx server errors trigger automatic exponential backoff retries within the worker.
Tool definitions
Section titled “Tool definitions”| Tool name | Description |
|---|---|
resolveLibraryId | Resolves natural language framework or package names to Context7-compatible library identifiers. |
queryDocs | Retrieves targeted documentation passages for a resolved library identifier matching specific query parameters. |
Both tools are strictly read-only, making no modifications to local workspace repositories.
Configuration
Section titled “Configuration”- Open your project in the Desktop application and enable the Context7 toggle. The integration is functional immediately in anonymous mode.
- (Optional) Generate an API key via context7.com/dashboard and paste it into integration settings to unlock higher rate limits.
Consult Connect an integration for broader integration management steps.
Security boundaries and data governance
Section titled “Security boundaries and data governance”Context7 lookups transmit only the query string and target library name to the Context7 API endpoint. No proprietary source code, workspace files, or adjacent service credentials leave the local environment. For details on credential isolation, see Credentials management and Data and privacy.