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

Function suggestSkills

packages/cli/src/utils/api.ts:47–61  ·  view source on GitHub ↗
(
  dependencies: string[],
  accessToken?: string
)

Source from the content-addressed store, hash-verified

45}
46
47export async function suggestSkills(
48 dependencies: string[],
49 accessToken?: string
50): Promise<SuggestResponse> {
51 const headers: Record<string, string> = { "Content-Type": "application/json" };
52 if (accessToken) {
53 headers["Authorization"] = `Bearer ${accessToken}`;
54 }
55 const response = await fetch(`${baseUrl}/api/v2/skills/suggest`, {
56 method: "POST",
57 headers,
58 body: JSON.stringify({ dependencies }),
59 });
60 return (await response.json()) as SuggestResponse;
61}
62
63export async function downloadSkill(project: string, skillName: string): Promise<DownloadResponse> {
64 const skillData = await getSkill(project, skillName);

Callers 1

suggestCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected