Skip to main content
Glama

Worksona MCP Server

Official
by worksona
clean-hooks-tools.jsโ€ข1.67 kB
#!/usr/bin/env node const fs = require('fs'); const path = require('path'); console.log('๐Ÿงน CLEANING HOOKS TOOL REFERENCES'); console.log('=================================\n'); const hooksFiles = [ 'teams/content-documentation/shadcn-ui-builder/hooks.json', 'teams/content-documentation/doc-writer/hooks.json', 'teams/software-engineering/refactor/hooks.json' ]; console.log(`๐Ÿ“‹ Processing ${hooksFiles.length} hooks files...\n`); let processedCount = 0; let errorCount = 0; hooksFiles.forEach((filePath) => { try { const fullPath = path.resolve(filePath); if (!fs.existsSync(fullPath)) { console.log(`โš ๏ธ File not found: ${filePath}`); errorCount++; return; } // Read and parse JSON const content = fs.readFileSync(fullPath, 'utf8'); const hooks = JSON.parse(content); let modified = false; // Remove PostToolUse hooks that reference tools if (hooks.PostToolUse) { delete hooks.PostToolUse; modified = true; } if (modified) { // Write back the cleaned hooks fs.writeFileSync(fullPath, JSON.stringify(hooks, null, 2) + '\n', 'utf8'); processedCount++; console.log(`โœ… ${filePath} - PostToolUse hooks removed`); } else { console.log(`โœ… ${filePath} - No tool references found`); } } catch (error) { console.error(`โŒ Error processing ${filePath}:`, error.message); errorCount++; } }); console.log(`\n๐ŸŽ‰ HOOKS CLEANUP COMPLETE!`); console.log(`โœ… Processed: ${processedCount} files`); console.log(`โŒ Errors: ${errorCount} files`); console.log(`๐Ÿ“Š Total: ${hooksFiles.length} files`);

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/worksona/-worksona-mcp-server'

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