Skip to main content
Glama

Daipendency

Official
by daipendency
import { afterEach, describe, expect, it } from 'vitest'; import type { RequestHandlerExtra } from '@modelcontextprotocol/sdk/shared/protocol.js'; import { dependencyDocsGetter } from './DependencyDocsGetter.js'; import { Library } from '@daipendency/core'; import { vi } from 'vitest'; vi.mock('@daipendency/core'); describe('DependencyDocsGetter.callback', () => { const callbackExtra: RequestHandlerExtra = { signal: AbortSignal.timeout(1000), }; afterEach(() => { vi.clearAllMocks(); }); it('should load dependency by name and dependant path', async () => { await dependencyDocsGetter.callback( { name: 'react', dependant_path: '/path/to/dependant' }, callbackExtra, ); expect(Library.loadDependency).toHaveBeenCalledWith( 'react', '/path/to/dependant', ); }); it('should return Markdown documentation', async () => { const result = await dependencyDocsGetter.callback( { name: 'react', dependant_path: '/path/to/dependant' }, callbackExtra, ); expect(result).toEqual({ content: [{ type: 'text', text: '## Documentation' }], }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daipendency/daipendency-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server