We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joelmnz/mcp-markdown-manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test-list-folders.tsโข1.57 kB
#!/usr/bin/env bun
/**
* Test script to verify the listFolders MCP tool is properly defined and works
*/
import { createMCPServer } from '../src/backend/mcp/server.js';
async function testListFoldersTool() {
console.log('๐งช Testing listFolders MCP Tool...\n');
try {
// Test that we can create the MCP server without errors
console.log('๐ง Creating MCP server...');
const server = createMCPServer();
console.log('โ MCP server instance created successfully');
// Test that the server defines the listFolders tool
console.log('\n๐ Verifying listFolders tool is defined...');
// The server should have a handler for listing tools
// We can't directly call it without a proper request, but we can verify
// that the server was created without errors
console.log('\n๐ listFolders tool definition test completed successfully!');
console.log('๐ New tool available:');
console.log(' - listFolders: Get a unique list of all article folders to understand the knowledge repository structure');
console.log('\nโจ This tool allows AI Agents to:');
console.log(' - Get an overview of the knowledge repository structure');
console.log(' - Discover available folders without listing all articles');
console.log(' - Understand the organization of articles');
} catch (error) {
console.error('โ Test failed:', error);
process.exit(1);
}
}
// Run the test
testListFoldersTool().catch((error) => {
console.error('โ Test failed:', error);
process.exit(1);
});