MCPcopy
hub / github.com/upstash/context7 / getContext

Method getContext

packages/sdk/src/client.ts:124–131  ·  view source on GitHub ↗

* 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
  )

Source from the content-addressed store, hash-verified

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}

Callers 3

queryDocsFunction · 0.80
client.test.tsFile · 0.80
index.test.tsFile · 0.80

Calls 1

execMethod · 0.95

Tested by

no test coverage detected