dependency_docs_getter
Extract complete documentation and public API for a specified dependency in a local project. Input the dependency name and project path to generate precise, version-specific reference materials.
Instructions
Extract all the documentation and public API for a dependency of a local project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dependant_path | Yes | The absolute path to the dependant project | |
| name | Yes | The name of the dependency for which to extract documentation |
Implementation Reference
- src/tools/DependencyDocsGetter.ts:24-36 (handler)Defines and exports the MCP tool object 'dependency_docs_getter' including name, description, parameters reference, and the execution callback that wraps the core logic to generate dependency 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 'dependency_docs_getter' tool: dependency name and path to the dependant project.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 implementing the tool logic: loads the specified dependency using @daipendency/core Library and generates its 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)Imports the dependency_docs_getter tool and includes it in the ALL_TOOLS export array for subsequent MCP server registration.import { dependencyDocsGetter } from './DependencyDocsGetter.js'; import type { Tool } from './Tool.js'; export const ALL_TOOLS: Tool<any>[] = [dependencyDocsGetter];
- src/index.ts:22-29 (registration)Loop that registers every tool from ALL_TOOLS (including dependency_docs_getter) to the MCP server via server.tool calls.for (const tool of ALL_TOOLS as Tool<ToolParameters>[]) { server.tool( tool.name, tool.description, tool.parameters, wrapCallbackError(tool.callback), ); }