bmad_parse_specification
Parse business specification documents to extract requirements and generate actionable tasks for project implementation.
Instructions
Parse a business specification document and generate tasks
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The specification content to parse | |
| format | Yes | Format of the specification content | |
| generateTasks | No | Whether to automatically generate tasks from requirements | |
| autoAssign | No | Whether to automatically assign tasks to agents | |
| validate | No | Whether to validate generated tasks |
Implementation Reference
- src/tools/bmad/index.ts:70-72 (handler)The MCP tool handler for 'bmad_parse_specification' that delegates execution to BMADService.parseSpecification with the provided arguments.tools.set('bmad_parse_specification', async (args: any) => { return await bmadService.parseSpecification(args); });
- src/tools/bmad/index.ts:14-47 (schema)Input schema and metadata definition for the bmad_parse_specification tool.{ name: 'bmad_parse_specification', description: 'Parse a business specification document and generate tasks', inputSchema: { type: 'object', properties: { content: { type: 'string', description: 'The specification content to parse' }, format: { type: 'string', enum: ['markdown', 'yaml', 'plain'], description: 'Format of the specification content' }, generateTasks: { type: 'boolean', description: 'Whether to automatically generate tasks from requirements', default: true }, autoAssign: { type: 'boolean', description: 'Whether to automatically assign tasks to agents', default: false }, validate: { type: 'boolean', description: 'Whether to validate generated tasks', default: true } }, required: ['content', 'format'] } },
- src/index.ts:405-407 (registration)Registration of BMAD tools (including bmad_parse_specification) in the main server by calling registerBMADTools and adding to toolDefinitions.if (this.config.services.bmad && this.bmadService) { const bmadTools = registerBMADTools(this.tools, this.bmadService); this.toolDefinitions.push(...bmadTools);
- src/services/BMADService.ts:81-129 (helper)Core helper method implementing the specification parsing logic for different formats, task generation, agent assignment, and task validation.async parseSpecification(request: ParseSpecRequest): Promise<ParseSpecResponse> { const { content, format, options = { generateTasks: false, autoAssign: false, validate: false } } = request; let spec: ParsedSpec; try { switch (format) { case 'markdown': spec = await this.parseMarkdown(content); break; case 'yaml': spec = await this.parseYAML(content); break; case 'plain': spec = await this.parsePlainText(content); break; default: throw new Error(`Unsupported format: ${format}`); } let tasks: Task[] = []; let assignments: Assignment[] = []; let validation: ValidationResult[] = []; if (options.generateTasks) { tasks = await this.generateTasks(spec); this.tasks.push(...tasks); } if (options.autoAssign && tasks.length > 0) { assignments = await this.assignTasks(tasks); this.assignments.push(...assignments); } if (options.validate && tasks.length > 0) { validation = await this.validateTasks(tasks); } return { spec, tasks, assignments, validation: validation.length > 0 ? validation : undefined }; } catch (error: any) { throw new Error(`Failed to parse specification: ${error.message}`); } }