Skip to main content
Glama

Spec Workflow MCP

by kingkongshot
createRequirementsDoc.ts1.07 kB
/** * Create requirements document */ import { writeFileSync, existsSync } from 'fs'; import { join } from 'path'; import { getRequirementsTemplate } from '../shared/documentTemplates.js'; export interface CreateResult { generated: boolean; message: string; filePath?: string; fileName?: string; } export function createRequirementsDocument( path: string, featureName: string, introduction: string ): CreateResult { const fileName = 'requirements.md'; const filePath = join(path, fileName); if (existsSync(filePath)) { return { generated: false, message: 'Requirements document already exists', fileName, filePath }; } try { const content = getRequirementsTemplate(featureName, introduction); writeFileSync(filePath, content, 'utf-8'); return { generated: true, message: 'Requirements document', fileName, filePath }; } catch (error) { return { generated: false, message: `Failed to create document: ${error}`, fileName }; } }

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/kingkongshot/specs-workflow-mcp'

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