diff --git a/server/mcp/api_creator.go b/server/mcp/api_creator.go index 42a7fcd5..d2de59b5 100644 --- a/server/mcp/api_creator.go +++ b/server/mcp/api_creator.go @@ -41,7 +41,7 @@ type ApiCreator struct{} // New 创建API创建工具 func (a *ApiCreator) New() mcp.Tool { return mcp.NewTool("create_api", - mcp.WithDescription("创建后端API记录,用于在生成后端接口时自动创建对应的API权限记录,只要创建了API层,router下的文件产生了路径变化等,都需要调用此mcp。"), + mcp.WithDescription("创建后端API记录,用于AI编辑器自动添加API接口时自动创建对应的API权限记录。注意:使用gva_auto_generate创建的包和模块会自动创建API权限,无需调用此工具。仅在AI编辑器自动添加API或router下的文件产生路径变化时使用。"), mcp.WithString("path", mcp.Required(), mcp.Description("API路径,如:/user/create"), diff --git a/server/mcp/execution_plan_schema.md b/server/mcp/execution_plan_schema.md index f2ed80a1..622e83d0 100644 --- a/server/mcp/execution_plan_schema.md +++ b/server/mcp/execution_plan_schema.md @@ -500,7 +500,20 @@ type DataSource struct { 1. **PackageType**: 只能是 "plugin" 或 "package" 2. **NeedCreatedPackage**: 当为true时,PackageInfo必须提供 3. **NeedCreatedModules**: 当为true时,ModulesInfo必须提供 -4. **字段类型**: FieldType支持的类型包括:string, int, int64, float64, bool, time.Time, enum, picture, video, file, pictures, array, richtext, json等 +4. **字段类型**: FieldType支持的类型包括: + - string(字符串) + - richtext(富文本) + - int(整型) + - bool(布尔值) + - float64(浮点型) + - time.Time(时间) + - enum(枚举) + - picture(单图片,字符串) + - pictures(多图片,json字符串) + - video(视频,字符串) + - file(文件,json字符串) + - json(JSON) + - array(数组) 5. **搜索类型**: FieldSearchType支持:EQ, NE, GT, GE, LT, LE, LIKE, BETWEEN等 6. **索引类型**: FieldIndexType支持:index, unique等 7. **GvaModel**: 设置为true时会自动包含ID、CreatedAt、UpdatedAt、DeletedAt字段 diff --git a/server/mcp/gag_usage_example.md b/server/mcp/gag_usage_example.md index 0bc9366b..cfc7fdcb 100644 --- a/server/mcp/gag_usage_example.md +++ b/server/mcp/gag_usage_example.md @@ -201,4 +201,5 @@ 1. 必须先调用`confirm`来获取确认信息 2. 在`execute`时必须提供相应的确认参数 3. 确认参数的值必须是"yes"或"no" -4. 如果不需要创建包或模块,则不需要提供对应的确认参数 \ No newline at end of file +4. 如果不需要创建包或模块,则不需要提供对应的确认参数 +5. 字段类型支持:string(字符串),richtext(富文本),int(整型),bool(布尔值),float64(浮点型),time.Time(时间),enum(枚举),picture(单图片,字符串),pictures(多图片,json字符串),video(视频,字符串),file(文件,json字符串),json(JSON),array(数组) \ No newline at end of file diff --git a/server/mcp/gva_auto_generate.go b/server/mcp/gva_auto_generate.go index 6999cbb5..c8b4c0f5 100644 --- a/server/mcp/gva_auto_generate.go +++ b/server/mcp/gva_auto_generate.go @@ -206,7 +206,7 @@ func (t *AutomationModuleAnalyzer) New() mcp.Tool { 1. needCreatedPackage=true时packageInfo必需 2. needCreatedModules=true时modulesInfo必需 3. packageType只能是"package"或"plugin" -4. 字段类型支持:string,int,int64,float64,bool,time.Time,enum,picture,video,file,pictures,array,richtext,json +4. 字段类型支持:string(字符串),richtext(富文本),int(整型),bool(布尔值),float64(浮点型),time.Time(时间),enum(枚举),picture(单图片,字符串),pictures(多图片,json字符串),video(视频,字符串),file(文件,json字符串),json(JSON),array(数组) 5. 搜索类型支持:=,!=,>,>=,<,<=,NOT BETWEEN/LIKE/BETWEEN/IN/NOT IN 6. gvaModel=true时自动包含ID,CreatedAt,UpdatedAt,DeletedAt字段 7. **重要**:当gvaModel=false时,必须有一个字段的primaryKey=true,否则会导致PrimaryField为nil错误 diff --git a/server/mcp/menu_creator.go b/server/mcp/menu_creator.go index cc8a2659..4add855c 100644 --- a/server/mcp/menu_creator.go +++ b/server/mcp/menu_creator.go @@ -64,7 +64,7 @@ type MenuCreator struct{} // New 创建菜单创建工具 func (m *MenuCreator) New() mcp.Tool { return mcp.NewTool("create_menu", - mcp.WithDescription("创建前端菜单记录,用于在生成前端页面时自动创建对应的菜单项,只要前端有页面生成,都需要调用此mcp。"), + mcp.WithDescription("创建前端菜单记录,用于AI编辑器自动添加前端页面时自动创建对应的菜单项。注意:使用gva_auto_generate创建的包和模块会自动创建菜单项,无需调用此工具。仅在AI编辑器自动添加前端页面时使用。"), mcp.WithNumber("parentId", mcp.Description("父菜单ID,0表示根菜单"), mcp.DefaultNumber(0),