Skip to main content
Glama
pyforge-method.js•1.31 kB
// PyForge IDE method to add to SimpleEGWDatabase class // This method provides Python execution capabilities for AI agents export async function pyforgeExecute(code, action = 'execute', packageName = null, toolName = 'pyforgeExecute-function') { console.error(`šŸ PyForge IDE executing action: ${action}`); try { // Import PyForge integration const { PyForgeIntegration } = await import('./pyforge-integration.js'); const pyforge = new PyForgeIntegration(); // Check if PyForge IDE is available if (!pyforge.isAvailable()) { throw new Error('āŒ PyForge IDE not found. Please ensure PyForge IDE is properly installed in packages/shared/src/database-utils'); } switch (action) { case 'execute': return await pyforge.executePythonCode(code); case 'install_package': if (!packageName) { throw new Error('āŒ Package name required for install_package action'); } return await pyforge.installPackage(packageName); case 'list_files': return await pyforge.listFiles(); default: throw new Error(`āŒ Unknown action: ${action}`); } } catch (error) { console.error('āŒ PyForge IDE execution error:', error.message); throw error; } }

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/pythondev-pro/egw_writings_mcp_server'

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