dependency_docs_getter
Extract documentation and public API for a project's dependency to understand its exact version and functionality.
Instructions
Extract all the documentation and public API for a dependency of a local project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the dependency for which to extract documentation | |
| dependant_path | Yes | The absolute path to the dependant project |
Implementation Reference
- src/tools/DependencyDocsGetter.ts:24-36 (handler)Implementation of the dependency_docs_getter tool, including the handler callback that extracts and returns documentation.export const dependencyDocsGetter: Tool<typeof dependencyDocsGetterParameters> = { name: 'dependency_docs_getter', description: 'Extract all the documentation and public API for a dependency of a local project', parameters: dependencyDocsGetterParameters, callback: async ({ name, dependant_path }) => { const docs = await extractDependencyDocs(name, dependant_path); return { content: [{ type: 'text', text: docs }], }; }, };
- Zod schema defining the input parameters for the tool: name and dependant_path.const dependencyDocsGetterParameters = { name: z.string({ description: 'The name of the dependency for which to extract documentation', }), dependant_path: z.string({ description: 'The absolute path to the dependant project', }), } as const;
- Core helper function that loads a dependency using Library.loadDependency and generates Markdown documentation.async function extractDependencyDocs( name: string, dependant_path: string, ): Promise<string> { const dependency = await Library.loadDependency(name, dependant_path); return dependency.generateMarkdownDocumentation(); }
- src/tools/index.ts:1-4 (registration)Tool registration by importing and including dependencyDocsGetter in the ALL_TOOLS export array.import { dependencyDocsGetter } from './DependencyDocsGetter.js'; import type { Tool } from './Tool.js'; export const ALL_TOOLS: Tool<any>[] = [dependencyDocsGetter];