Skip to main content
Glama

MCPMan

by semistrict
list-macros.test.ts1.56 kB
import { test, expect, describe } from './test-fixtures.js'; describe('List Macros Test', () => { test('should return available macros from fixture roots', async ({ client }) => { const result = await client.callTool({ name: 'list_macros', arguments: {}, }); const content = result.content as Array<{ type: string; text: string }>; const data = JSON.parse(content[0]?.text || '{}'); expect(data.macros).toBeDefined(); expect(Array.isArray(data.macros)).toBe(true); // Should have macros from fixture directories expect(data.macros.length).toBeGreaterThan(0); // Each macro should have name, description, and modulePath for (const macro of data.macros) { expect(macro.name).toBeDefined(); expect(typeof macro.name).toBe('string'); expect(macro.description).toBeDefined(); expect(typeof macro.description).toBe('string'); expect(macro.modulePath).toBeDefined(); expect(typeof macro.modulePath).toBe('string'); } }); test('should discover macros from multiple fixture roots', async ({ client }) => { const result = await client.callTool({ name: 'list_macros', arguments: {}, }); const content = result.content as Array<{ type: string; text: string }>; const data = JSON.parse(content[0]?.text || '{}'); const macroNames = data.macros.map((m: { name: string }) => m.name); // Should have macros from both root1 and root2 expect(macroNames).toContain('addNumbers'); expect(macroNames).toContain('greet'); }); });

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/semistrict/mcpman'

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