@jmkim85/dev-flow-mcp
Version:
MCP-based Dev Flow - AI-powered development workflow management with 13 essential tools for TDD and context management
234 lines • 7.61 kB
JavaScript
/**
* Tool Definitions Module
* Defines all MCP tool schemas for Dev Flow
*/
// Define the tools
export const tools = [
{
name: "get_next_task",
description: "Get the current task status and next action to take",
inputSchema: {
type: "object",
properties: {},
},
},
{
name: "start_task",
description: "Start working on a specific task at a given stage",
inputSchema: {
type: "object",
properties: {
task_id: {
type: "string",
description: "ID of the task to start"
},
stage: {
type: "string",
enum: ["analyze", "write_tests", "implement", "refactor"],
description: "Stage to start at (default: analyze)"
}
},
required: ["task_id"],
},
},
{
name: "check_progress",
description: "Check current progress and validate if ready for next stage",
inputSchema: {
type: "object",
properties: {
run_tests: {
type: "boolean",
description: "Whether to run tests as part of the check"
}
},
},
},
{
name: "save_checkpoint",
description: "Save current progress as a checkpoint",
inputSchema: {
type: "object",
properties: {
message: {
type: "string",
description: "Checkpoint message describing what was accomplished"
},
files: {
type: "array",
items: { type: "string" },
description: "List of files that were changed"
}
},
required: ["message"],
},
},
{
name: "record_mistake",
description: "Record a mistake pattern for future learning",
inputSchema: {
type: "object",
properties: {
pattern: {
type: "string",
description: "Description of the mistake pattern"
},
context: {
type: "string",
description: "Context where the mistake occurred"
},
solution: {
type: "string",
description: "How to avoid or fix this mistake"
}
},
required: ["pattern"],
},
},
{
name: "complete_task",
description: "Mark the current task as complete",
inputSchema: {
type: "object",
properties: {
summary: {
type: "string",
description: "Summary of what was accomplished"
}
},
},
},
// Context Management (3 tools)
{
name: "create_context_frame",
description: "Create a new context frame for better context management",
inputSchema: {
type: "object",
properties: {
task_id: { type: "string" },
stage: { type: "string" },
summary: { type: "string", description: "Brief summary of current context" }
},
required: ["task_id", "stage"]
}
},
{
name: "add_context_fact",
description: "Add an important fact to the current context frame",
inputSchema: {
type: "object",
properties: {
fact: { type: "string" },
is_global: { type: "boolean", description: "Whether this fact applies globally" }
},
required: ["fact"]
}
},
{
name: "get_context",
description: "Get current context summary for the active task",
inputSchema: {
type: "object",
properties: {}
}
},
// Workflow Management (1 tool)
{
name: "load_workflow",
description: "Load a workflow with stage-by-stage instructions",
inputSchema: {
type: "object",
properties: {
workflow_id: {
type: "string",
description: "ID of the workflow to load (e.g., 'tdd_strict', 'general_dev')"
}
},
required: ["workflow_id"]
}
},
// Project Maintenance (3 tools)
{
name: "clean_temp_files",
description: "Clean temporary files and IDE artifacts from the project",
inputSchema: {
type: "object",
properties: {}
}
},
{
name: "initialize_project_file",
description: "Initialize a project file from a template (project_overview, tasklist, readme, requirements, or design_spec)",
inputSchema: {
type: "object",
properties: {
template_type: {
type: "string",
enum: ["project_overview", "tasklist", "readme", "requirements", "design_spec"],
description: "Type of template to initialize"
}
},
required: ["template_type"]
}
},
{
name: "init_project",
description: "Initialize a new Dev Flow project with complete directory structure and templates (5-1)",
inputSchema: {
type: "object",
properties: {
project_name: {
type: "string",
description: "Name of the project (optional, defaults to current directory name)"
},
project_type: {
type: "string",
enum: ["web", "api", "library", "cli", "mobile", "data", "general"],
description: "Type of project to initialize (affects templates and structure)"
},
workflow_type: {
type: "string",
enum: ["tdd_strict", "general_dev", "agile_sprint"],
description: "Default workflow to use for this project"
},
include_templates: {
type: "boolean",
description: "Whether to include all template files (default: true)"
}
}
}
},
// Workflow Control (1 tool)
{
name: "advance_stage",
description: "Advance to the next stage in the current workflow for the active task",
inputSchema: {
type: "object",
properties: {
summary: {
type: "string",
description: "Optional summary of completed stage"
}
}
}
},
{
name: "create_task_structure",
description: "Create the folder structure for a new task with proper directories",
inputSchema: {
type: "object",
properties: {
task_id: {
type: "string",
description: "Task ID (e.g., T-2025-06-003)"
},
task_title: {
type: "string",
description: "Brief title for the task"
}
},
required: ["task_id", "task_title"]
}
}
];
//# sourceMappingURL=tool-definitions.js.map