export function validateWorkflowSpec(input: any): boolean {
if (!input || typeof input !== 'object') return false;
if (!Array.isArray(input.nodes)) return false;
for (const node of input.nodes) {
if (typeof node !== 'object' || typeof node.type !== 'string' || typeof node.name !== 'string') {
return false;
}
}
// If connections are provided, they must be an array.
if (input.connections && !Array.isArray(input.connections)) return false;
return true;
}
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/makafeli/n8n-workflow-builder'
If you have feedback or need assistance with the MCP directory API, please join our Discord server