fetch-peacock-docs
Retrieve and interpret Peacock for VS Code extension documentation from GitHub to answer user queries, enabling quick access to accurate information for efficient usage.
Instructions
Fetches the Peacock for VS Code extension docs from its GitHub repository and answers questions based on the documentation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The question to answer based on the Peacock documentation |
Implementation Reference
- src/index.ts:29-45 (handler)Inline asynchronous handler function for the 'fetch-peacock-docs' tool. It takes a query, calls handleDocumentationQuery to process it, and returns the text content or an error message in structured format.async ({ query }) => { try { const { text } = await handleDocumentationQuery(query); return { content: [{ type: "text", text }], }; } catch (error) { return { content: [ { type: "text", text: `Error searching Peacock documentation: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }
- src/index.ts:28-28 (schema)Input schema for the 'fetch-peacock-docs' tool, defining a single string parameter 'query' using Zod.{ query: z.string().describe("The question to answer based on the Peacock documentation") },
- src/index.ts:24-46 (registration)Registration of the 'fetch-peacock-docs' tool on the MCP server, including name, description, input schema, and handler function.// Tool to fetch Peacock documentation and answer questions server.tool( "fetch-peacock-docs", "Fetches the Peacock for VS Code extension docs from its GitHub repository and answers questions based on the documentation ", { query: z.string().describe("The question to answer based on the Peacock documentation") }, async ({ query }) => { try { const { text } = await handleDocumentationQuery(query); return { content: [{ type: "text", text }], }; } catch (error) { return { content: [ { type: "text", text: `Error searching Peacock documentation: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } );
- src/index.ts:4-4 (helper)Import statement for the handleDocumentationQuery function used in the tool handler. Note: the target file was not found in the codebase.import { handleDocumentationQuery } from "./utils/peacock-docs.js";