* Get documentation context for a library * @param query The user's question or task * @param libraryId Context7 library ID (e.g., "/react/react") * @param options Response format options * @returns Documentation as Documentation[] (json, default) or string (txt)
(
query: string,
libraryId: string,
options?: GetContextOptions
)
| 122 | * @returns Documentation as Documentation[] (json, default) or string (txt) |
| 123 | */ |
| 124 | async getContext( |
| 125 | query: string, |
| 126 | libraryId: string, |
| 127 | options?: GetContextOptions |
| 128 | ): Promise<Documentation[] | string> { |
| 129 | const command = new GetContextCommand(query, libraryId, options); |
| 130 | return await command.exec(this.httpClient); |
| 131 | } |
| 132 | } |
no test coverage detected