@8btc/ppt-generator-mcp 0.0.32-beta.4 → 0.0.32-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,7 +63,71 @@ const t = zod_1.z.object({ ...inputSchema });
|
|
|
63
63
|
const tool = {
|
|
64
64
|
name: "generate_ppt",
|
|
65
65
|
title: "ppt生成工具",
|
|
66
|
-
description:
|
|
66
|
+
description: `
|
|
67
|
+
## generate_ppt参数outline的要求
|
|
68
|
+
1. 严格按照以下JSON格式生成:
|
|
69
|
+
- cover: 封面页,包含title和text
|
|
70
|
+
- contents: 目录页,包含items数组
|
|
71
|
+
- transition: 过渡页,包含title和text
|
|
72
|
+
- content: 内容页,包含title和items数组,每个item包含title和text
|
|
73
|
+
- end: 结束页
|
|
74
|
+
|
|
75
|
+
2. 内容要求:
|
|
76
|
+
- **章节数量**:整个PPT的目录控制生成 2-4 个章节(即ppt的目录页控制2-4个具体目录)
|
|
77
|
+
- **页数控制**:用户未指定生成总页数,控制在8-15页
|
|
78
|
+
- **要点精炼**:每个内容页的 \`items\` 数组中,每个要点的 \`title\` 必须是高度提炼的短句(每个章节包含1-4个要点),长度不超过 15 个字符,每个要点的 \`text\` 要点的详细内容介绍可以有更多内容介绍。符合PPT标题简洁,内容充裕的原则。
|
|
79
|
+
- **逻辑性**:内容必须严格遵循**总-分-总**的逻辑结构,确保章节间过渡自然。
|
|
80
|
+
- **专业性**:内容要专业、有逻辑性,并能直接支持演示文稿使用。
|
|
81
|
+
- time取get_timely_info的结果中的now_data_time值
|
|
82
|
+
- **文档结构严格遵循**:封面页 → 目录页 → 过渡页 → 内容页 → 结束页
|
|
83
|
+
|
|
84
|
+
参考格式示例(请根据实际主题调整内容):
|
|
85
|
+
\`\`\`json
|
|
86
|
+
[
|
|
87
|
+
{
|
|
88
|
+
"type": "cover",
|
|
89
|
+
"data": {
|
|
90
|
+
"title": "主题标题",
|
|
91
|
+
"text": "副标题或简介"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "contents",
|
|
96
|
+
"data": {
|
|
97
|
+
"items": ["章节1", "章节2", "章节3"]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "transition",
|
|
102
|
+
"data": {
|
|
103
|
+
"title": "章节标题",
|
|
104
|
+
"text": "章节介绍"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "content",
|
|
109
|
+
"data": {
|
|
110
|
+
"title": "具体内容标题",
|
|
111
|
+
"items": [
|
|
112
|
+
{
|
|
113
|
+
"title": "要点1",
|
|
114
|
+
"text": "要点1的详细说明"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"images": [
|
|
118
|
+
{
|
|
119
|
+
"imageType": "pageFigure",
|
|
120
|
+
"src": "http://www.exp.com/xxx.png"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "end"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
\`\`\`
|
|
130
|
+
`,
|
|
67
131
|
inputSchema: (0, schema_1.zodToJsonSchema)(inputSchema),
|
|
68
132
|
};
|
|
69
133
|
const toolHandler = async ({ outline, templateFilePath, outputPath, }) => {
|
package/dist/tools/update-ppt.js
CHANGED
|
@@ -22,7 +22,7 @@ const inputSchema = {
|
|
|
22
22
|
outputPath: zod_1.z.string().optional(),
|
|
23
23
|
outlinePath: zod_1.z
|
|
24
24
|
.string()
|
|
25
|
-
.describe("需要替换的PPT
|
|
25
|
+
.describe("需要替换的PPT文件大纲(outline.json)文件地址"),
|
|
26
26
|
pageIndex: zod_1.z.number().describe("需要替换的页码,从0开始"),
|
|
27
27
|
newContent: zod_1.z.discriminatedUnion("type", [
|
|
28
28
|
zod_1.z.object({
|
|
@@ -64,8 +64,8 @@ const inputSchema = {
|
|
|
64
64
|
// tool descriptor
|
|
65
65
|
const tool = {
|
|
66
66
|
name: "update_ppt",
|
|
67
|
-
title: "
|
|
68
|
-
description: "通过修改outline.json
|
|
67
|
+
title: "更新ppt",
|
|
68
|
+
description: "通过修改outline.json第index项对象,从而完成重新生成某一页",
|
|
69
69
|
inputSchema: (0, schema_1.zodToJsonSchema)(inputSchema),
|
|
70
70
|
};
|
|
71
71
|
const t = zod_1.z.object({ ...inputSchema });
|