Skip to main content
Glama
check-tools.cjs•1.27 kB
#!/usr/bin/env node const { spawn } = require('child_process'); const server = spawn('node', ['dist/index.js'], { stdio: ['pipe', 'pipe', 'pipe'], env: process.env }); let responseBuffer = ''; server.stdout.on('data', (data) => { responseBuffer += data.toString(); const lines = responseBuffer.split('\n'); for (let i = 0; i < lines.length - 1; i++) { const line = lines[i].trim(); if (line) { try { const response = JSON.parse(line); if (response.result?.tools) { console.log('\nđź”§ AVAILABLE TOOLS:'); const plainUserTools = response.result.tools.filter(tool => tool.name.includes('plain') || tool.name.includes('users') || tool.name.includes('sub') ); console.log('Plain/Users/Sub tools:'); plainUserTools.forEach(tool => { console.log(` ${tool.name}: ${tool.description}`); }); server.kill(); return; } } catch (e) { // Not JSON } } } responseBuffer = lines[lines.length - 1]; }); server.stderr.on('data', () => {}); setTimeout(() => { server.stdin.write('{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}\n'); }, 2000); setTimeout(() => { server.kill(); }, 5000);

Latest Blog Posts

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/daviddraiumbrella/invoice-monitoring'

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