start_feature_clarification
Clarify software feature requirements by generating structured specifications from initial descriptions, enabling clear development planning.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| featureName | Yes | ||
| initialDescription | No |
Implementation Reference
- src/tool-handlers.ts:54-81 (handler)The primary handler function that executes the logic for the 'start_feature_clarification' tool. It validates input, creates a new feature object, persists it, generates the first clarification question, and returns a response with the feature ID and question./** * Start feature clarification handler */ const startFeatureClarificationHandler: ToolHandler<z.infer<typeof StartFeatureClarificationSchema>> = async (params) => { try { const { featureName, initialDescription } = StartFeatureClarificationSchema.parse(params); // Create a new feature const feature = createFeatureObject(featureName, initialDescription); updateFeature(feature.id, feature); // Get the first clarification question const firstQuestion = getNextClarificationQuestion(feature); return { content: [{ type: "text", text: `Feature ID: ${feature.id}\n\nLet's clarify your feature request. ${firstQuestion}` }] }; } catch (error) { if (error instanceof z.ZodError) { const errorMessage = error.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', '); return createToolErrorResponse(`Validation error: ${errorMessage}`); } return createToolErrorResponse(error instanceof Error ? error.message : "Unknown error"); } };
- src/tool-handlers.ts:48-52 (schema)Zod schema defining the input parameters for the 'start_feature_clarification' tool: featureName (required string) and optional initialDescription.// Schema for start_feature_clarification const StartFeatureClarificationSchema = z.object({ featureName: z.string().min(2).max(100), initialDescription: z.string().optional().default("") });
- src/tool-handlers.ts:510-538 (registration)Registration of the 'start_feature_clarification' tool in the tool registry, specifying the handler, description, JSON schema for inputs, and example arguments.toolRegistry.register( 'start_feature_clarification', startFeatureClarificationHandler, 'Start the clarification process for a new feature', { type: "object", properties: { featureName: { type: "string", description: "Name of the feature" }, initialDescription: { type: "string", description: "Initial description of the feature" } }, required: ["featureName"] }, [ { featureName: "User Authentication", initialDescription: "Add login and registration functionality to the application" }, { featureName: "Data Export", initialDescription: "Allow users to export their data in CSV and JSON formats" } ] );
- src/mcp-server.ts:297-318 (registration)Direct registration of the 'start_feature_clarification' tool using the MCP server SDK, with inline Zod schema and simplified handler logic (appears to be a duplicate or alternative implementation).server.tool( "start_feature_clarification", { featureName: z.string().min(2).max(100), initialDescription: z.string().optional().default("") }, async ({ featureName, initialDescription }) => { // Create a new feature const feature = createFeatureObject(featureName, initialDescription); updateFeature(feature.id, feature); // Get the first clarification question const firstQuestion = getNextClarificationQuestion(feature); return { content: [{ type: "text", text: `Feature ID: ${feature.id}\n\nLet's clarify your feature request. ${firstQuestion}` }] }; } );