package org.dromara.ai.mcp.tools;

import org.dromara.ai.mcp.McpTool;

import java.util.HashMap;
import java.util.Map;

public class ProjectScaffoldTool implements McpTool {
    @Override
    public String name() {
        return "project_scaffold";
    }

    @Override
    public String description() {
        return "生成项目脚手架方案";
    }

    @Override
    public Map<String, Object> schema() {
        Map<String, Object> s = new HashMap<>();
        s.put("type", "object");
        s.put("properties", Map.of("type", Map.of("type", "string")));
        return s;
    }

    @Override
    public Map<String, Object> invoke(Map<String, Object> input) {
        String type = String.valueOf(input.getOrDefault("type", "webapp"));
        Map<String, Object> out = new HashMap<>();
        out.put("plan", "生成 " + type + " 脚手架，包含依赖、目录结构与初始化命令");
        return out;
    }
}
