@8btc/ppt-generator-mcp 0.0.32-beta.4 → 0.0.32-beta.6

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,62 @@ const t = zod_1.z.object({ ...inputSchema });
63
63
  const tool = {
64
64
  name: "generate_ppt",
65
65
  title: "ppt生成工具",
66
- description: "根据大纲自动匹配模板生成PPT文件",
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
+ 参考格式示例(请根据实际主题调整内容):
76
+ \`\`\`json
77
+ [
78
+ {
79
+ "type": "cover",
80
+ "data": {
81
+ "title": "主题标题",
82
+ "text": "副标题或简介"
83
+ }
84
+ },
85
+ {
86
+ "type": "contents",
87
+ "data": {
88
+ "items": ["章节1", "章节2", "章节3"]
89
+ }
90
+ },
91
+ {
92
+ "type": "transition",
93
+ "data": {
94
+ "title": "章节标题",
95
+ "text": "章节介绍"
96
+ }
97
+ },
98
+ {
99
+ "type": "content",
100
+ "data": {
101
+ "title": "具体内容标题",
102
+ "items": [
103
+ {
104
+ "title": "要点1",
105
+ "text": "要点1的详细说明"
106
+ }
107
+ ],
108
+ "images": [
109
+ {
110
+ "imageType": "pageFigure",
111
+ "src": "http://www.exp.com/xxx.png"
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ "type": "end"
118
+ }
119
+ ]
120
+ \`\`\`
121
+ `,
67
122
  inputSchema: (0, schema_1.zodToJsonSchema)(inputSchema),
68
123
  };
69
124
  const toolHandler = async ({ outline, templateFilePath, outputPath, }) => {
@@ -139,7 +139,7 @@ const exportPPTX = (_slides, ignoreMedia, options) => {
139
139
  };
140
140
  if (el.imageType) {
141
141
  options.sizing = {
142
- type: "contain",
142
+ type: "cover",
143
143
  w: el.width / ratioPx2Inch(viewportSize),
144
144
  h: el.height / ratioPx2Inch(viewportSize),
145
145
  };
@@ -20,10 +20,9 @@ const inputSchema = {
20
20
  templateFilePath: zod_1.z.string().optional(),
21
21
  // 输出地址
22
22
  outputPath: zod_1.z.string().optional(),
23
- outlinePath: zod_1.z
24
- .string()
25
- .describe("需要替换的PPT文件大纲路径,outputPath(原ppt输出路径)/outline.json"),
26
- pageIndex: zod_1.z.number().describe("需要替换的页码,从0开始"),
23
+ outlinePath: zod_1.z.string().describe(`需要替换的PPT文件大纲(pptFileName_outline.json)文件地址, 文件名由ppt文件名和下划线outline拼接,
24
+ 例如:AI个性化学习_outline.json`),
25
+ pageIndex: zod_1.z.number().describe("需要替换的页码,从0开始, 例如:2"),
27
26
  newContent: zod_1.z.discriminatedUnion("type", [
28
27
  zod_1.z.object({
29
28
  type: zod_1.z.literal("cover"),
@@ -64,8 +63,8 @@ const inputSchema = {
64
63
  // tool descriptor
65
64
  const tool = {
66
65
  name: "update_ppt",
67
- title: "修改大纲重新生成",
68
- description: "通过修改outline.jsonindex项对象,从而完成重新生成某一页",
66
+ title: "更新ppt",
67
+ description: "通过修改outline.jsonindex项对象,从而完成重新生成某一页",
69
68
  inputSchema: (0, schema_1.zodToJsonSchema)(inputSchema),
70
69
  };
71
70
  const t = zod_1.z.object({ ...inputSchema });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8btc/ppt-generator-mcp",
3
- "version": "0.0.32-beta.4",
3
+ "version": "0.0.32-beta.6",
4
4
  "description": "MCP service for generating PPT files from AI-generated outlines and templates",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {