pptx-viewer-mcp 2.1.6 → 2.2.0

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs re-releases a package whenever any of its files
8
8
  change, not only on conventional ones.
9
9
 
10
+ ## [2.1.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@2.1.7) - 2026-08-26
11
+
12
+ ### Dependencies
13
+
14
+ - **deps:** Update fast-xml-parser requirement from ^5.10.1 to ^5.11.0 ([#177](https://github.com/ChristopherVR/pptx-viewer/issues/177)) (by @dependabot[bot]) ([a876e0f](https://github.com/ChristopherVR/pptx-viewer/commit/a876e0f5fd07fd2e7063619882313cc23c4a0162))
15
+
16
+ ## [2.1.6](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@2.1.6) - 2026-08-22
17
+
18
+ ### Bug Fixes
19
+
20
+ - **tools:** Widen the core dependency range to the new major (by @ChristopherVR) ([0221c2b](https://github.com/ChristopherVR/pptx-viewer/commit/0221c2b05b7bf2ff0d87034a1564673eee574c45))
21
+
10
22
  ## [2.1.5](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@2.1.5) - 2026-08-22
11
23
 
12
24
  ## [2.1.4](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@2.1.4) - 2026-08-21
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm](https://img.shields.io/npm/v/pptx-viewer-mcp.svg)](https://www.npmjs.com/package/pptx-viewer-mcp)
4
4
  [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
5
 
6
- Edit PowerPoint files from an AI agent. It ships a ready-to-run [MCP](https://modelcontextprotocol.io) server that gives an agent 54 PowerPoint editing tools (for example "add a slide" or "replace text"). The same tools are also available as plain functions you can call yourself, along with their Zod input schemas and a codec for real-time collaboration (Y.Doc). The [`pptx-viewer-core`](https://www.npmjs.com/package/pptx-viewer-core) engine is bundled in, so a single install gives you everything and you never install the core separately.
6
+ Edit PowerPoint files from an AI agent. It ships a ready-to-run [MCP](https://modelcontextprotocol.io) server that gives an agent 58 PowerPoint editing tools (for example "add a slide" or "replace text"). The same tools are also available as plain functions you can call yourself, along with their Zod input schemas and a codec for real-time collaboration (Y.Doc). The [`pptx-viewer-core`](https://www.npmjs.com/package/pptx-viewer-core) engine is bundled in, so a single install gives you everything and you never install the core separately.
7
7
 
8
8
  ![An AI agent calling validated MCP tools to edit and save a PowerPoint file](https://raw.githubusercontent.com/ChristopherVR/pptx-viewer/main/.github/assets/packages/mcp-tools.svg)
9
9
 
@@ -31,7 +31,7 @@ No clone, no build, no separate core install. Point your MCP client at the publi
31
31
 
32
32
  That is the entire setup. `npx` downloads `pptx-viewer-mcp` and its bundled `pptx-viewer-core` engine on first run, so there is nothing else to install. Add the config above, restart your client, and the tools are available.
33
33
 
34
- This works in Claude Desktop, Claude Code, Cursor, and any MCP-compatible client. All 54 tools are exposed over stdio in snake_case (for example `add_slide`, `batch_update_elements`). Every tool takes a `filePath` argument and the server handles load and save internally. File access is scoped to a root directory (`PPTX_TOOLS_ROOT`, defaulting to the process working directory) and restricted to `.pptx` and `.ppt` files.
34
+ This works in Claude Desktop, Claude Code, Cursor, and any MCP-compatible client. All 58 tools are exposed over stdio in snake_case (for example `add_slide`, `batch_update_elements`). Every tool takes a `filePath` argument and the server handles load and save internally. File access is scoped to a root directory (`PPTX_TOOLS_ROOT`, defaulting to the process working directory) and restricted to `.pptx` and `.ppt` files.
35
35
 
36
36
  > If you prefer a global install (`npm i -g pptx-viewer-mcp`), the same server is available as the `pptx-tools` binary. Point `command` at `pptx-tools` with no args.
37
37
 
@@ -73,29 +73,29 @@ See [Use as a library](#use-as-a-library) below for the higher-level `executeToo
73
73
 
74
74
  | Entry point | Contents |
75
75
  | ------------------------- | ----------------------------------------------------------------------------------------------------- |
76
- | `pptx-viewer-mcp` | 54 tool functions, the `PptxHandler` engine, provider types, and the execution pipeline |
76
+ | `pptx-viewer-mcp` | 58 tool functions, the `PptxHandler` engine, provider types, and the execution pipeline |
77
77
  | `pptx-viewer-mcp/schemas` | Zod schemas for every tool input |
78
78
  | `pptx-viewer-mcp/codec` | `PptxCodec`, the Y.Doc to PPTX bytes codec |
79
79
  | `pptx-viewer-mcp/mcp` | The runnable stdio server entry (what `npx pptx-viewer-mcp` executes); importing it starts the server |
80
80
 
81
81
  ## Tools
82
82
 
83
- | Group | Tools |
84
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
85
- | Slide (8) | `getSlide` `addSlide` `deleteSlides` `reorderSlides` `duplicateSlide` `updateSlideProperties` `setSlideTransition` `setCanvasSize` |
86
- | Element (9) | `addElement` `updateElement` `deleteElements` `arrangeElements` `cloneElement` `setElementAnimation` `groupElements` `ungroupElements` `batchUpdateElements` |
87
- | Table (2) | `updateTableCells` `manageTableStructure` |
88
- | Style (2) | `updateElementStyle` `runAccessibilityCheck` |
89
- | Content (3) | `findText` `replaceText` `manageComments` |
90
- | Chart (5) | `createChart` `updateChart` `addChartSeries` `removeChartSeries` `updateChartSeriesData` |
91
- | Theme (4) | `getThemeInfo` `applyThemePreset` `updateThemeColors` `updateThemeFonts` |
92
- | SmartArt (1) | `manageSmartArt` |
93
- | Template & layout (4) | `findPlaceholders` `applyTemplate` `getLayouts` `applyLayout` |
94
- | Metadata & properties (4) | `getMetadata` `updateMetadata` `getPresentationProperties` `updatePresentationProperties` |
95
- | Sections & hyperlinks (2) | `manageSections` `manageHyperlinks` |
96
- | Geometry & locking (2) | `replaceGeometry` `setElementLock` |
97
- | Validation (2) | `validatePresentation` `repairPresentation` |
98
- | Export & conversion (5) | `convertToMarkdown` `exportToSvg` `exportSlideSvg` `exportToJson` `importFromJson` |
83
+ | Group | Tools |
84
+ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85
+ | Slide (8) | `getSlide` `addSlide` `deleteSlides` `reorderSlides` `duplicateSlide` `updateSlideProperties` `setSlideTransition` `setCanvasSize` |
86
+ | Element (9) | `addElement` `updateElement` `deleteElements` `arrangeElements` `cloneElement` `setElementAnimation` `groupElements` `ungroupElements` `batchUpdateElements` |
87
+ | Table (2) | `updateTableCells` `manageTableStructure` |
88
+ | Style (2) | `updateElementStyle` `runAccessibilityCheck` |
89
+ | Content (3) | `findText` `replaceText` `manageComments` |
90
+ | Chart (9) | `createChart` `updateChart` `addChartSeries` `removeChartSeries` `updateChartSeriesData` `listChartUserShapes` `addChartUserShape` `updateChartUserShape` `removeChartUserShape` |
91
+ | Theme (4) | `getThemeInfo` `applyThemePreset` `updateThemeColors` `updateThemeFonts` |
92
+ | SmartArt (1) | `manageSmartArt` |
93
+ | Template & layout (4) | `findPlaceholders` `applyTemplate` `getLayouts` `applyLayout` |
94
+ | Metadata & properties (4) | `getMetadata` `updateMetadata` `getPresentationProperties` `updatePresentationProperties` |
95
+ | Sections & hyperlinks (2) | `manageSections` `manageHyperlinks` |
96
+ | Geometry & locking (2) | `replaceGeometry` `setElementLock` |
97
+ | Validation (2) | `validatePresentation` `repairPresentation` |
98
+ | Export & conversion (5) | `convertToMarkdown` `exportToSvg` `exportSlideSvg` `exportToJson` `importFromJson` |
99
99
 
100
100
  ## Use as a library
101
101
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Doc } from "yjs";
2
- import { ChartAxisEdit, PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxData, PptxData as PptxData$1, PptxData as PptxData$2, PptxElement, PptxElement as PptxElement$1, PptxHandler, PptxJsonAssetStats, PptxPresentationProperties, PptxSlide, PptxSlide as PptxSlide$1, PptxThemeColorScheme, PptxThemeFontScheme, PresentationDiff, ShapeStyle } from "pptx-viewer-core";
2
+ import { ChartAxisEdit, PptxAppProperties, PptxChartUserShape, PptxCoreProperties, PptxCustomProperty, PptxData, PptxData as PptxData$1, PptxData as PptxData$2, PptxElement, PptxElement as PptxElement$1, PptxHandler, PptxJsonAssetStats, PptxPresentationProperties, PptxSlide, PptxSlide as PptxSlide$1, PptxThemeColorScheme, PptxThemeFontScheme, PresentationDiff, ShapeStyle } from "pptx-viewer-core";
3
3
  //#region src/types.d.ts
4
4
  /**
5
5
  * Platform-agnostic context passed to every tool function.
@@ -636,6 +636,64 @@ interface CreateChartResult {
636
636
  }
637
637
  declare function createChart(ctx: ToolContext, params: CreateChartParams): ToolResult<CreateChartResult>;
638
638
  //#endregion
639
+ //#region src/tools/chart-user-shape-tools.d.ts
640
+ /** The overlay-shape fields an AI tool call can set, flattened from `PptxChartUserShape`. */
641
+ interface ChartUserShapeInput {
642
+ kind?: 'sp' | 'cxnSp';
643
+ anchor?: 'rel' | 'abs';
644
+ from: {
645
+ x: number;
646
+ y: number;
647
+ };
648
+ to?: {
649
+ x: number;
650
+ y: number;
651
+ };
652
+ ext?: {
653
+ cx: number;
654
+ cy: number;
655
+ };
656
+ prst?: string;
657
+ fill?: string;
658
+ stroke?: string;
659
+ strokeWidth?: number;
660
+ /** Plain text content; mapped onto a single centred paragraph. */
661
+ text?: string;
662
+ }
663
+ interface ListChartUserShapesParams {
664
+ slideIndex: number;
665
+ elementId: string;
666
+ }
667
+ declare function listChartUserShapesT(ctx: ToolContext, params: ListChartUserShapesParams): ToolResult<{
668
+ shapes: PptxChartUserShape[];
669
+ }>;
670
+ interface AddChartUserShapeParams {
671
+ slideIndex: number;
672
+ elementId: string;
673
+ shape: ChartUserShapeInput;
674
+ }
675
+ declare function addChartUserShapeT(ctx: ToolContext, params: AddChartUserShapeParams): ToolResult<{
676
+ elementId: string;
677
+ index: number;
678
+ }>;
679
+ interface UpdateChartUserShapeParams {
680
+ slideIndex: number;
681
+ elementId: string;
682
+ index: number;
683
+ patch: Partial<ChartUserShapeInput>;
684
+ }
685
+ declare function updateChartUserShapeT(ctx: ToolContext, params: UpdateChartUserShapeParams): ToolResult<{
686
+ elementId: string;
687
+ }>;
688
+ interface RemoveChartUserShapeParams {
689
+ slideIndex: number;
690
+ elementId: string;
691
+ index: number;
692
+ }
693
+ declare function removeChartUserShapeT(ctx: ToolContext, params: RemoveChartUserShapeParams): ToolResult<{
694
+ elementId: string;
695
+ }>;
696
+ //#endregion
639
697
  //#region src/tools/smartart-tools.d.ts
640
698
  interface ManageSmartArtParams {
641
699
  slideIndex: number;
@@ -941,5 +999,5 @@ interface ApplyLayoutResult {
941
999
  }
942
1000
  declare function applyLayout(ctx: ToolContext, params: ApplyLayoutParams): ToolResult<ApplyLayoutResult>;
943
1001
  //#endregion
944
- export { type AccessibilityCheckResult, type AccessibilityIssue, type AddChartSeriesParams, type AddElementParams, type AddElementResult, type AddSlideParams, type AddSlideResult, type ApplyLayoutParams, type ApplyLayoutResult, type ApplyTemplateParams, type ApplyTemplateResult, type ApplyThemePresetParams, type ApplyThemePresetResult, type ArrangeElementsParams, type BatchUpdateElementsParams, type CloneElementParams, type CloneElementResult, type CollaborationProvider, type CommentInfo, type ConvertToMarkdownParams, type ConvertToMarkdownResult, type CreateChartParams, type CreateChartResult, type DeleteElementsParams, type DeleteSlidesParams, type DeleteSlidesResult, type DiffPresentationsParams, type DuplicateSlideParams, type ExecutionContext, type ExportSlideSvgParams, type ExportSlideSvgResult, type ExportToJsonParams, type ExportToJsonResult, type ExportToSvgParams, type ExportToSvgResult, type FileSystemProvider, type FindPlaceholdersResult, type FindTextParams, type FindTextResult, type GetLayoutsResult, type GetSlideResult, type GroupElementsParams, type GroupElementsResult, type HyperlinkInfo, type ImportFromJsonParams, type ImportFromJsonResult, type LayoutInfo, type ManageCommentsParams, type ManageCommentsResult, type ManageHyperlinksParams, type ManageHyperlinksResult, type ManageSectionsParams, type ManageSectionsResult, type ManageSmartArtParams, type ManageSmartArtResult, type ManageTableStructureParams, type MergePresentationParams, type MergePresentationResult, type MetadataResult, type PptxData, type PptxElement, PptxHandler, type PptxSlide, type RemoveChartSeriesParams, type RenameElementParams, type ReorderSlidesParams, type RepairPresentationResult, type ReplaceGeometryParams, type ReplaceTextParams, type ReplaceTextResult, type SectionInfo, type SetCanvasSizeParams, type SetElementAnimationParams, type SetElementLockParams, type SetSlideTransitionParams, type SmartArtNodeInfo, type TextMatch, type ThemeInfo, type ToolContext, type ToolResult, type UngroupElementsParams, type UngroupElementsResult, type UpdateChartParams, type UpdateChartSeriesDataParams, type UpdateElementParams, type UpdateElementStyleParams, type UpdateMetadataParams, type UpdatePresentationPropertiesParams, type UpdateSlidePropertiesParams, type UpdateTableCellsParams, type UpdateThemeColorsParams, type UpdateThemeFontsParams, type ValidatePresentationResult, type ViewerProvider, addChartSeriesT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToJson, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, importFromJson, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, renameElement, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
1002
+ export { type AccessibilityCheckResult, type AccessibilityIssue, type AddChartSeriesParams, type AddChartUserShapeParams, type AddElementParams, type AddElementResult, type AddSlideParams, type AddSlideResult, type ApplyLayoutParams, type ApplyLayoutResult, type ApplyTemplateParams, type ApplyTemplateResult, type ApplyThemePresetParams, type ApplyThemePresetResult, type ArrangeElementsParams, type BatchUpdateElementsParams, type ChartUserShapeInput, type CloneElementParams, type CloneElementResult, type CollaborationProvider, type CommentInfo, type ConvertToMarkdownParams, type ConvertToMarkdownResult, type CreateChartParams, type CreateChartResult, type DeleteElementsParams, type DeleteSlidesParams, type DeleteSlidesResult, type DiffPresentationsParams, type DuplicateSlideParams, type ExecutionContext, type ExportSlideSvgParams, type ExportSlideSvgResult, type ExportToJsonParams, type ExportToJsonResult, type ExportToSvgParams, type ExportToSvgResult, type FileSystemProvider, type FindPlaceholdersResult, type FindTextParams, type FindTextResult, type GetLayoutsResult, type GetSlideResult, type GroupElementsParams, type GroupElementsResult, type HyperlinkInfo, type ImportFromJsonParams, type ImportFromJsonResult, type LayoutInfo, type ListChartUserShapesParams, type ManageCommentsParams, type ManageCommentsResult, type ManageHyperlinksParams, type ManageHyperlinksResult, type ManageSectionsParams, type ManageSectionsResult, type ManageSmartArtParams, type ManageSmartArtResult, type ManageTableStructureParams, type MergePresentationParams, type MergePresentationResult, type MetadataResult, type PptxData, type PptxElement, PptxHandler, type PptxSlide, type RemoveChartSeriesParams, type RemoveChartUserShapeParams, type RenameElementParams, type ReorderSlidesParams, type RepairPresentationResult, type ReplaceGeometryParams, type ReplaceTextParams, type ReplaceTextResult, type SectionInfo, type SetCanvasSizeParams, type SetElementAnimationParams, type SetElementLockParams, type SetSlideTransitionParams, type SmartArtNodeInfo, type TextMatch, type ThemeInfo, type ToolContext, type ToolResult, type UngroupElementsParams, type UngroupElementsResult, type UpdateChartParams, type UpdateChartSeriesDataParams, type UpdateChartUserShapeParams, type UpdateElementParams, type UpdateElementStyleParams, type UpdateMetadataParams, type UpdatePresentationPropertiesParams, type UpdateSlidePropertiesParams, type UpdateTableCellsParams, type UpdateThemeColorsParams, type UpdateThemeFontsParams, type ValidatePresentationResult, type ViewerProvider, addChartSeriesT, addChartUserShapeT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToJson, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, importFromJson, listChartUserShapesT, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, removeChartUserShapeT, renameElement, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateChartUserShapeT, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
945
1003
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/execution.ts","../src/tools/slide-tools.ts","../src/tools/helpers.ts","../src/tools/element-tools.ts","../src/tools/table-tools.ts","../src/tools/style-tools.ts","../src/tools/content-tools.ts","../src/tools/conversion-tools.ts","../src/tools/theme-tools.ts","../src/tools/chart-tools.ts","../src/tools/smartart-tools.ts","../src/tools/merge-tools.ts","../src/tools/template-tools.ts","../src/tools/metadata-tools.ts","../src/tools/section-tools.ts","../src/tools/export-tools.ts","../src/tools/json-tools.ts","../src/tools/hyperlink-tools.ts","../src/tools/geometry-tools.ts","../src/tools/lock-tools.ts","../src/tools/validation-tools.ts","../src/tools/presentation-tools.ts","../src/tools/layout-tools.ts"],"mappings":";;;;;;;UAOiB;;EAEhB,UAAU;;EAEV,gBAAgB,iBAAiB,QAAQ;;EAEzC,gBAAgB,iBAAiB,QAAQ;;;;;;UAOzB,WAAW;;EAE3B,UAAU;;EAEV,QAAQ;;EAER;;;;;;UAWgB;;EAEhB,QAAQ;IAAqB,MAAM;;;EAEnC,SAAS;IACR,QAAQ,MAAM,KAAM,OAAO,YAAY,kBAAkB;IACzD,UAAU,MAAM,MAAO,QAAQ;;;EAGh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B;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;UAGgB;EAChB;EACA;;iBAGe,WACf,KAAK,aACL,QAAQ,mBACN,WAAW;UAmKG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN;EAAa;;UA8GC;EAChB;EACA;;EAEA;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN;EAAa;EAAmB;;UA4BlB;EAChB;EACA;;iBAGe,eACf,KAAK,aACL,QAAQ,uBACN;EAAa;;UA0BC;EAChB;EACA;EAEA;EACA;EAEA;EACA;;iBAGe,gBACf,KAAK,aACL,QAAQ,wBACN;EAAa;;UA6GC;EAChB;EACA;EACA;EACA;EACA;;UAGgB;EAChB;;iBAGe,aACf,KAAK,aACL,QAAQ,qBACN,WAAW;UA6CG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBACf,KAAK,aACL,QAAQ,4BACN;EAAa;;UAsDC;EAChB;EACA;;UAGgB;EAChB;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN,WAAW;UAmCG;EAChB;EACA;;UAGgB;EAChB;;iBAGe,gBACf,KAAK,aACL,QAAQ,wBACN,WAAW;UA6CG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBACf,KAAK,aACL,QAAQ,4BACN;EAAa;;;;UClyBC;EAChB;EACA;EACA,OAAO;IAAQ;IAAa;IAAa;;;iBAG1B,iBACf,KAAK,aACL,QAAQ,yBACN;EAAa;;UA6CC;EAChB;EACA;EACA;EACA;EACA;EACA;;iBAGe,qBACf,KAAK,aACL,QAAQ,6BACN;EAAa;EAAkB;;;;UCjEjB;EAChB;EACA;EAEA;EACA,WAAW;EACX,oBAAoB;IAAQ;IAAe;IAAkB;;EAC7D;EACA;EACA;EAEA;EACA;EACA,aAAa;EACb;EAEA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,mBACf,KAAK,aACL,QAAQ,2BACN;EAAa;;UA6HC;EAChB;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA;EACA;EACA;EACA,QAAQ;;iBAGO,sBAAsB,KAAK,cAAc,WAAW;;;UCnJnD;EAChB;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA,SAAS;;iBAGM,SAAS,KAAK,aAAa,QAAQ,iBAAiB,WAAW;UA2G9D;EAChB;EACA;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA;;iBAGe,YACf,KAAK,aACL,QAAQ,oBACN,WAAW;UAiGG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;;UAGgB;EAChB;EACA;EACA;EACA;EACA;EACA;;UAGgB;EAChB;EACA,WAAW;EACX;EACA;;iBAGe,eACf,KAAK,aACL,QAAQ,uBACN,WAAW;;;UCpTG;EAChB;EACA;EACA;EACA;IAAe;IAAgB;;EAC/B;EACA;EACA;;;;;;EAMA;;;;;;;;;;;;;;EAcA,kBAAkB,mBAAmB;;UAGrB;EAChB;EACA;EACA;EACA;;iBAGqB,kBACrB,KAAK,aACL,QAAQ,0BACN,QAAQ,WAAW;;;UCjCL;EAChB;EACA,cAAc;EACd,aAAa;EACb;;iBAGe,aAAa,KAAK,cAAc,WAAW;UAgB1C;EAChB;;UAGgB;EAChB;EACA,aAAa;;iBAGE,iBACf,KAAK,aACL,QAAQ,yBACN,WAAW;UA8BG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,kBACf,KAAK,aACL,QAAQ,0BACN;EAAa,aAAa;;UAsCZ;EAChB;EACA;;iBAGe,iB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;EACA;EACA;EACA;EACA;;iBAGe,6BACf,KAAK,aACL,QAAQ,qCACN;EAAa,YAAY;;;;UClCX;EAChB;EACA;EACA;;UAGgB;EAChB,SAAS;EACT;;iBAGe,WAAW,KAAK,cAAc,WAAW;UAmCxC;EAChB;EACA;EACA;;UAGgB;EAChB;EACA;;iBAGe,YACf,KAAK,aACL,QAAQ,oBACN,WAAW"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/execution.ts","../src/tools/slide-tools.ts","../src/tools/helpers.ts","../src/tools/element-tools.ts","../src/tools/table-tools.ts","../src/tools/style-tools.ts","../src/tools/content-tools.ts","../src/tools/conversion-tools.ts","../src/tools/theme-tools.ts","../src/tools/chart-tools.ts","../src/tools/chart-user-shape-tools.ts","../src/tools/smartart-tools.ts","../src/tools/merge-tools.ts","../src/tools/template-tools.ts","../src/tools/metadata-tools.ts","../src/tools/section-tools.ts","../src/tools/export-tools.ts","../src/tools/json-tools.ts","../src/tools/hyperlink-tools.ts","../src/tools/geometry-tools.ts","../src/tools/lock-tools.ts","../src/tools/validation-tools.ts","../src/tools/presentation-tools.ts","../src/tools/layout-tools.ts"],"mappings":";;;;;;;UAOiB;;EAEhB,UAAU;;EAEV,gBAAgB,iBAAiB,QAAQ;;EAEzC,gBAAgB,iBAAiB,QAAQ;;;;;;UAOzB,WAAW;;EAE3B,UAAU;;EAEV,QAAQ;;EAER;;;;;;UAWgB;;EAEhB,QAAQ;IAAqB,MAAM;;;EAEnC,SAAS;IACR,QAAQ,MAAM,KAAM,OAAO,YAAY,kBAAkB;IACzD,UAAU,MAAM,MAAO,QAAQ;;;EAGhC,YAAY;;;;;;;UAQI;EAChB,SAAS,eAAe,QAAQ;EAChC,UAAU,cAAc,MAAM,aAAa;;;;;;UAO3B;EAChB,eACC,kBACA,OAAO,YACP;IAAW;IAAoB;;EAEhC,SAAS,mBAAmB;;;;;UAMZ;;EAEhB,YAAY;;EAEZ,gBAAgB;;EAEhB,SAAS;;EAET;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN;EAAa;;UA8GC;EAChB;EACA;;EAEA;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN;EAAa;EAAmB;;UA4BlB;EAChB;EACA;;iBAGe,eACf,KAAK,aACL,QAAQ,uBACN;EAAa;;UA0BC;EAChB;EACA;EAEA;EACA;EAEA;EACA;;iBAGe,gBACf,KAAK,aACL,QAAQ,wBACN;EAAa;;UA6GC;EAChB;EACA;EACA;EACA;EACA;;UAGgB;EAChB;;iBAGe,aACf,KAAK,aACL,QAAQ,qBACN,WAAW;UA6CG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBACf,KAAK,aACL,QAAQ,4BACN;EAAa;;UAsDC;EAChB;EACA;;UAGgB;EAChB;;iBAGe,cACf,KAAK,aACL,QAAQ,sBACN,WAAW;UAmCG;EAChB;EACA;;UAGgB;EAChB;;iBAGe,gBACf,KAAK,aACL,QAAQ,wBACN,WAAW;UA6CG;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBACf,KAAK,aACL,QAAQ,4BACN;EAAa;;;;UClyBC;EAChB;EACA;EACA,OAAO;IAAQ;IAAa;IAAa;;;iBAG1B,iBACf,KAAK,aACL,QAAQ,yBACN;EAAa;;UA6CC;EAChB;EACA;EACA;EACA;EACA;EACA;;iBAGe,qBACf,KAAK,aACL,QAAQ,6BACN;EAAa;EAAkB;;;;UCjEjB;EAChB;EACA;EAEA;EACA,WAAW;EACX,oBAAoB;IAAQ;IAAe;IAAkB;;EAC7D;EACA;EACA;EAEA;EACA;EACA,aAAa;EACb;EAEA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,mBACf,KAAK,aACL,QAAQ,2BACN;EAAa;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;iBASoB,qBACrB,UAAU,cACR,QAAQ;UAaM;EAChB;EACA;;iBAGqB,mBACrB,UAAU,cACR;EAAU,QAAQ;EAA0B,eAAe;;;;iBCvC9C,0BAA0B,KAAK,cAAc;EAC5D,YAAY;EACZ;EACA;EACA;;UAgBgB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,6BACf,KAAK,aACL,QAAQ,qCACN;EAAa,YAAY;;;;UClCX;EAChB;EACA;EACA;;UAGgB;EAChB,SAAS;EACT;;iBAGe,WAAW,KAAK,cAAc,WAAW;UAmCxC;EAChB;EACA;EACA;;UAGgB;EAChB;EACA;;iBAGe,YACf,KAAK,aACL,QAAQ,oBACN,WAAW"}
package/dist/index.js CHANGED
@@ -1848,6 +1848,67 @@ function createChart(ctx, params) {
1848
1848
  result: { elementId: chart.id, slideIndex: params.slideIndex }
1849
1849
  };
1850
1850
  }
1851
+ function findChartElement(ctx, slideIndex, elementId) {
1852
+ const err = validateSlideIndex(slideIndex, ctx.pptxData.slides.length);
1853
+ if (err) {
1854
+ throw new Error(err);
1855
+ }
1856
+ const slide = ctx.pptxData.slides[slideIndex];
1857
+ const el = slide.elements.find((e) => e.id === elementId);
1858
+ if (!el) {
1859
+ throw new Error(`Element '${elementId}' not found on slide ${slideIndex}.`);
1860
+ }
1861
+ if (el.type !== "chart") {
1862
+ throw new Error(`Element '${elementId}' is not a chart.`);
1863
+ }
1864
+ return el;
1865
+ }
1866
+ function buildShape(input) {
1867
+ return {
1868
+ kind: input.kind ?? "sp",
1869
+ anchor: input.anchor ?? "rel",
1870
+ from: input.from,
1871
+ ...input.to ? { to: input.to } : {},
1872
+ ...input.ext ? { ext: input.ext } : {},
1873
+ ...input.prst ? { prst: input.prst } : {},
1874
+ ...input.fill ? { fill: input.fill } : {},
1875
+ ...input.stroke ? { stroke: input.stroke } : {},
1876
+ ...input.strokeWidth !== void 0 ? { strokeWidth: input.strokeWidth } : {},
1877
+ ...input.text ? { paragraphs: [{ text: input.text, align: "ctr" }] } : {}
1878
+ };
1879
+ }
1880
+ function listChartUserShapesT(ctx, params) {
1881
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1882
+ return { pptxData: ctx.pptxData, dirty: false, result: { shapes: pptxViewerCore.listChartUserShapes(chart) } };
1883
+ }
1884
+ function addChartUserShapeT(ctx, params) {
1885
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1886
+ pptxViewerCore.addChartUserShape(chart, buildShape(params.shape));
1887
+ const index = (chart.chartData?.userShapes?.length ?? 1) - 1;
1888
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId, index } };
1889
+ }
1890
+ function updateChartUserShapeT(ctx, params) {
1891
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1892
+ const patch = {
1893
+ ...params.patch.kind ? { kind: params.patch.kind } : {},
1894
+ ...params.patch.anchor ? { anchor: params.patch.anchor } : {},
1895
+ ...params.patch.from ? { from: params.patch.from } : {},
1896
+ ...params.patch.to ? { to: params.patch.to } : {},
1897
+ ...params.patch.ext ? { ext: params.patch.ext } : {},
1898
+ ...params.patch.prst ? { prst: params.patch.prst } : {},
1899
+ ...params.patch.fill ? { fill: params.patch.fill } : {},
1900
+ ...params.patch.stroke ? { stroke: params.patch.stroke } : {},
1901
+ ...params.patch.strokeWidth !== void 0 ? { strokeWidth: params.patch.strokeWidth } : {},
1902
+ ...params.patch.text !== void 0 ? { paragraphs: [{ text: params.patch.text, align: "ctr" }] } : {}
1903
+ };
1904
+ pptxViewerCore.updateChartUserShape(chart, params.index, patch);
1905
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
1906
+ }
1907
+ function removeChartUserShapeT(ctx, params) {
1908
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1909
+ pptxViewerCore.removeChartUserShape(chart, params.index);
1910
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
1911
+ }
1851
1912
  function extractNodes(data) {
1852
1913
  if (!data.nodes) {
1853
1914
  return [];
@@ -2593,6 +2654,7 @@ Object.defineProperty(exports, "PptxHandler", {
2593
2654
  get: function () { return pptxViewerCore.PptxHandler; }
2594
2655
  });
2595
2656
  exports.addChartSeriesT = addChartSeriesT;
2657
+ exports.addChartUserShapeT = addChartUserShapeT;
2596
2658
  exports.addElement = addElement;
2597
2659
  exports.addSlide = addSlide;
2598
2660
  exports.applyLayout = applyLayout;
@@ -2624,6 +2686,7 @@ exports.getSlide = getSlide;
2624
2686
  exports.getThemeInfo = getThemeInfo;
2625
2687
  exports.groupElements = groupElements;
2626
2688
  exports.importFromJson = importFromJson;
2689
+ exports.listChartUserShapesT = listChartUserShapesT;
2627
2690
  exports.loadPresentation = loadPresentation;
2628
2691
  exports.manageComments = manageComments;
2629
2692
  exports.manageHyperlinks = manageHyperlinks;
@@ -2632,6 +2695,7 @@ exports.manageSmartArt = manageSmartArt;
2632
2695
  exports.manageTableStructure = manageTableStructure;
2633
2696
  exports.mergePresentationT = mergePresentationT;
2634
2697
  exports.removeChartSeriesT = removeChartSeriesT;
2698
+ exports.removeChartUserShapeT = removeChartUserShapeT;
2635
2699
  exports.renameElement = renameElement;
2636
2700
  exports.reorderSlides = reorderSlides;
2637
2701
  exports.repairPresentation = repairPresentation;
@@ -2646,6 +2710,7 @@ exports.setSlideTransition = setSlideTransition;
2646
2710
  exports.ungroupElements = ungroupElements;
2647
2711
  exports.updateChart = updateChart;
2648
2712
  exports.updateChartSeriesData = updateChartSeriesData;
2713
+ exports.updateChartUserShapeT = updateChartUserShapeT;
2649
2714
  exports.updateElement = updateElement;
2650
2715
  exports.updateElementStyle = updateElementStyle;
2651
2716
  exports.updateMetadata = updateMetadata;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { PptxHandler, hasTextProperties, cloneElement as cloneElement$1, isTemplateElementId, makeStoreAwareId, reassignDescendantIds, groupElements as groupElements$1, ungroupElements as ungroupElements$1, PptxMarkdownConverter, ThemePresets, getThemePreset, setChartType, setChartTitle, setChartGrouping, setChartLegend, setChartDataLabels, setChartAxis, setChartCategories, addChartSeries, removeChartSeries, updateChartSeriesValues, ChartBuilder, decomposeSmartArt, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, updateSmartArtNodeText, removeSmartArtNode, addSmartArtNode, mergePresentation, diffPresentations, findPlaceholders, applyTemplate, getSectionForSlide, moveSlidesToSection, reorderSections, removeSection, addSection, SvgExporter, buildPptxJsonDocument, deserializePptxFromJson, applyImportedPptxData, replaceWithCustomGeometry, replaceShapeGeometry, setElementLocked, validatePptx, repairPptx, findLayoutByName, findLayoutByType } from 'pptx-viewer-core';
1
+ import { PptxHandler, hasTextProperties, cloneElement as cloneElement$1, isTemplateElementId, makeStoreAwareId, reassignDescendantIds, groupElements as groupElements$1, ungroupElements as ungroupElements$1, PptxMarkdownConverter, ThemePresets, getThemePreset, setChartType, setChartTitle, setChartGrouping, setChartLegend, setChartDataLabels, setChartAxis, setChartCategories, addChartSeries, removeChartSeries, updateChartSeriesValues, ChartBuilder, listChartUserShapes, addChartUserShape, updateChartUserShape, removeChartUserShape, decomposeSmartArt, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, updateSmartArtNodeText, removeSmartArtNode, addSmartArtNode, mergePresentation, diffPresentations, findPlaceholders, applyTemplate, getSectionForSlide, moveSlidesToSection, reorderSections, removeSection, addSection, SvgExporter, buildPptxJsonDocument, deserializePptxFromJson, applyImportedPptxData, replaceWithCustomGeometry, replaceShapeGeometry, setElementLocked, validatePptx, repairPptx, findLayoutByName, findLayoutByType } from 'pptx-viewer-core';
2
2
  export { PptxHandler } from 'pptx-viewer-core';
3
3
 
4
4
  // src/execution.ts
@@ -1847,6 +1847,67 @@ function createChart(ctx, params) {
1847
1847
  result: { elementId: chart.id, slideIndex: params.slideIndex }
1848
1848
  };
1849
1849
  }
1850
+ function findChartElement(ctx, slideIndex, elementId) {
1851
+ const err = validateSlideIndex(slideIndex, ctx.pptxData.slides.length);
1852
+ if (err) {
1853
+ throw new Error(err);
1854
+ }
1855
+ const slide = ctx.pptxData.slides[slideIndex];
1856
+ const el = slide.elements.find((e) => e.id === elementId);
1857
+ if (!el) {
1858
+ throw new Error(`Element '${elementId}' not found on slide ${slideIndex}.`);
1859
+ }
1860
+ if (el.type !== "chart") {
1861
+ throw new Error(`Element '${elementId}' is not a chart.`);
1862
+ }
1863
+ return el;
1864
+ }
1865
+ function buildShape(input) {
1866
+ return {
1867
+ kind: input.kind ?? "sp",
1868
+ anchor: input.anchor ?? "rel",
1869
+ from: input.from,
1870
+ ...input.to ? { to: input.to } : {},
1871
+ ...input.ext ? { ext: input.ext } : {},
1872
+ ...input.prst ? { prst: input.prst } : {},
1873
+ ...input.fill ? { fill: input.fill } : {},
1874
+ ...input.stroke ? { stroke: input.stroke } : {},
1875
+ ...input.strokeWidth !== void 0 ? { strokeWidth: input.strokeWidth } : {},
1876
+ ...input.text ? { paragraphs: [{ text: input.text, align: "ctr" }] } : {}
1877
+ };
1878
+ }
1879
+ function listChartUserShapesT(ctx, params) {
1880
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1881
+ return { pptxData: ctx.pptxData, dirty: false, result: { shapes: listChartUserShapes(chart) } };
1882
+ }
1883
+ function addChartUserShapeT(ctx, params) {
1884
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1885
+ addChartUserShape(chart, buildShape(params.shape));
1886
+ const index = (chart.chartData?.userShapes?.length ?? 1) - 1;
1887
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId, index } };
1888
+ }
1889
+ function updateChartUserShapeT(ctx, params) {
1890
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1891
+ const patch = {
1892
+ ...params.patch.kind ? { kind: params.patch.kind } : {},
1893
+ ...params.patch.anchor ? { anchor: params.patch.anchor } : {},
1894
+ ...params.patch.from ? { from: params.patch.from } : {},
1895
+ ...params.patch.to ? { to: params.patch.to } : {},
1896
+ ...params.patch.ext ? { ext: params.patch.ext } : {},
1897
+ ...params.patch.prst ? { prst: params.patch.prst } : {},
1898
+ ...params.patch.fill ? { fill: params.patch.fill } : {},
1899
+ ...params.patch.stroke ? { stroke: params.patch.stroke } : {},
1900
+ ...params.patch.strokeWidth !== void 0 ? { strokeWidth: params.patch.strokeWidth } : {},
1901
+ ...params.patch.text !== void 0 ? { paragraphs: [{ text: params.patch.text, align: "ctr" }] } : {}
1902
+ };
1903
+ updateChartUserShape(chart, params.index, patch);
1904
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
1905
+ }
1906
+ function removeChartUserShapeT(ctx, params) {
1907
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
1908
+ removeChartUserShape(chart, params.index);
1909
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
1910
+ }
1850
1911
  function extractNodes(data) {
1851
1912
  if (!data.nodes) {
1852
1913
  return [];
@@ -2587,4 +2648,4 @@ function applyLayout(ctx, params) {
2587
2648
  };
2588
2649
  }
2589
2650
 
2590
- export { addChartSeriesT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToJson, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, importFromJson, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, renameElement, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
2651
+ export { addChartSeriesT, addChartUserShapeT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToJson, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, importFromJson, listChartUserShapesT, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, removeChartUserShapeT, renameElement, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateChartUserShapeT, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
package/dist/mcp/index.js CHANGED
@@ -376,6 +376,50 @@ var CreateChartSchema = zod.z.object({
376
376
  position: zod.z.string().optional()
377
377
  }).optional().describe("Legend configuration")
378
378
  });
379
+ var PointSchema = zod.z.object({ x: zod.z.number(), y: zod.z.number() });
380
+ var ExtentSchema = zod.z.object({ cx: zod.z.number(), cy: zod.z.number() });
381
+ var ChartUserShapeInputSchema = zod.z.object({
382
+ kind: zod.z.enum(["sp", "cxnSp"]).optional().describe('Overlay shape kind: "sp" (text/preset shape, default) or "cxnSp" (connector).'),
383
+ anchor: zod.z.enum(["rel", "abs"]).optional().describe(
384
+ 'Anchor kind: "rel" (default, resizes with the chart; needs `to`) or "abs" (fixed EMU size; needs `ext`).'
385
+ ),
386
+ from: PointSchema.describe("Top-left corner as chart-relative fractions (0-1 each)."),
387
+ to: PointSchema.optional().describe(
388
+ "Bottom-right corner as chart-relative fractions; rel anchors only."
389
+ ),
390
+ ext: ExtentSchema.optional().describe("Width/height in EMU; abs anchors only."),
391
+ prst: zod.z.string().optional().describe('Preset geometry name (e.g. "rect", "roundRect"); default "rect".'),
392
+ fill: zod.z.string().optional().describe('Solid fill colour, hex (e.g. "#FFFF00").'),
393
+ stroke: zod.z.string().optional().describe("Line colour, hex."),
394
+ strokeWidth: zod.z.number().optional().describe("Line width in points."),
395
+ text: zod.z.string().optional().describe("Plain text content, centred in the shape.")
396
+ });
397
+ var ListChartUserShapesSchema = zod.z.object({
398
+ filePath: zod.z.string().describe("Path to the PPTX file"),
399
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
400
+ elementId: zod.z.string().describe("Chart element ID")
401
+ });
402
+ var AddChartUserShapeSchema = zod.z.object({
403
+ filePath: zod.z.string().describe("Path to the PPTX file"),
404
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
405
+ elementId: zod.z.string().describe("Chart element ID"),
406
+ shape: ChartUserShapeInputSchema.describe("The overlay shape to add.")
407
+ });
408
+ var UpdateChartUserShapeSchema = zod.z.object({
409
+ filePath: zod.z.string().describe("Path to the PPTX file"),
410
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
411
+ elementId: zod.z.string().describe("Chart element ID"),
412
+ index: zod.z.number().int().min(0).describe("Zero-based overlay-shape index (from chart_user_shape_list)"),
413
+ patch: ChartUserShapeInputSchema.partial().describe(
414
+ "Fields to overwrite; anything omitted is left as-is."
415
+ )
416
+ });
417
+ var RemoveChartUserShapeSchema = zod.z.object({
418
+ filePath: zod.z.string().describe("Path to the PPTX file"),
419
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
420
+ elementId: zod.z.string().describe("Chart element ID"),
421
+ index: zod.z.number().int().min(0).describe("Zero-based overlay-shape index to remove")
422
+ });
379
423
  var ManageSmartArtSchema = zod.z.object({
380
424
  filePath: zod.z.string().describe("Path to the PPTX file"),
381
425
  slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
@@ -795,6 +839,67 @@ function createChart(ctx, params) {
795
839
  result: { elementId: chart.id, slideIndex: params.slideIndex }
796
840
  };
797
841
  }
842
+ function findChartElement(ctx, slideIndex, elementId) {
843
+ const err = validateSlideIndex(slideIndex, ctx.pptxData.slides.length);
844
+ if (err) {
845
+ throw new Error(err);
846
+ }
847
+ const slide = ctx.pptxData.slides[slideIndex];
848
+ const el = slide.elements.find((e) => e.id === elementId);
849
+ if (!el) {
850
+ throw new Error(`Element '${elementId}' not found on slide ${slideIndex}.`);
851
+ }
852
+ if (el.type !== "chart") {
853
+ throw new Error(`Element '${elementId}' is not a chart.`);
854
+ }
855
+ return el;
856
+ }
857
+ function buildShape(input) {
858
+ return {
859
+ kind: input.kind ?? "sp",
860
+ anchor: input.anchor ?? "rel",
861
+ from: input.from,
862
+ ...input.to ? { to: input.to } : {},
863
+ ...input.ext ? { ext: input.ext } : {},
864
+ ...input.prst ? { prst: input.prst } : {},
865
+ ...input.fill ? { fill: input.fill } : {},
866
+ ...input.stroke ? { stroke: input.stroke } : {},
867
+ ...input.strokeWidth !== void 0 ? { strokeWidth: input.strokeWidth } : {},
868
+ ...input.text ? { paragraphs: [{ text: input.text, align: "ctr" }] } : {}
869
+ };
870
+ }
871
+ function listChartUserShapesT(ctx, params) {
872
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
873
+ return { pptxData: ctx.pptxData, dirty: false, result: { shapes: pptxViewerCore.listChartUserShapes(chart) } };
874
+ }
875
+ function addChartUserShapeT(ctx, params) {
876
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
877
+ pptxViewerCore.addChartUserShape(chart, buildShape(params.shape));
878
+ const index = (chart.chartData?.userShapes?.length ?? 1) - 1;
879
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId, index } };
880
+ }
881
+ function updateChartUserShapeT(ctx, params) {
882
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
883
+ const patch = {
884
+ ...params.patch.kind ? { kind: params.patch.kind } : {},
885
+ ...params.patch.anchor ? { anchor: params.patch.anchor } : {},
886
+ ...params.patch.from ? { from: params.patch.from } : {},
887
+ ...params.patch.to ? { to: params.patch.to } : {},
888
+ ...params.patch.ext ? { ext: params.patch.ext } : {},
889
+ ...params.patch.prst ? { prst: params.patch.prst } : {},
890
+ ...params.patch.fill ? { fill: params.patch.fill } : {},
891
+ ...params.patch.stroke ? { stroke: params.patch.stroke } : {},
892
+ ...params.patch.strokeWidth !== void 0 ? { strokeWidth: params.patch.strokeWidth } : {},
893
+ ...params.patch.text !== void 0 ? { paragraphs: [{ text: params.patch.text, align: "ctr" }] } : {}
894
+ };
895
+ pptxViewerCore.updateChartUserShape(chart, params.index, patch);
896
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
897
+ }
898
+ function removeChartUserShapeT(ctx, params) {
899
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
900
+ pptxViewerCore.removeChartUserShape(chart, params.index);
901
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
902
+ }
798
903
  var MAX_REGEX_LEN = 200;
799
904
  function hasNestedUnboundedQuantifier(pattern) {
800
905
  return /\([^)]*[+*]\)[+*]/u.test(pattern);
@@ -3770,6 +3875,62 @@ function createServer() {
3770
3875
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3771
3876
  }
3772
3877
  );
3878
+ server2.registerTool(
3879
+ "chart_user_shape_list",
3880
+ {
3881
+ description: "List a chart's drawing-overlay shapes (c:userShapes)",
3882
+ inputSchema: ListChartUserShapesSchema.shape
3883
+ },
3884
+ async (params) => {
3885
+ const result = await runMcpTool(
3886
+ params.filePath,
3887
+ (ctx) => listChartUserShapesT(ctx, params)
3888
+ );
3889
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3890
+ }
3891
+ );
3892
+ server2.registerTool(
3893
+ "chart_user_shape_add",
3894
+ {
3895
+ description: "Add a drawing-overlay shape (text box or connector) to a chart's c:userShapes",
3896
+ inputSchema: AddChartUserShapeSchema.shape
3897
+ },
3898
+ async (params) => {
3899
+ const result = await runMcpTool(
3900
+ params.filePath,
3901
+ (ctx) => addChartUserShapeT(ctx, params)
3902
+ );
3903
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3904
+ }
3905
+ );
3906
+ server2.registerTool(
3907
+ "chart_user_shape_update",
3908
+ {
3909
+ description: "Move, resize, or restyle one of a chart's drawing-overlay shapes by index",
3910
+ inputSchema: UpdateChartUserShapeSchema.shape
3911
+ },
3912
+ async (params) => {
3913
+ const result = await runMcpTool(
3914
+ params.filePath,
3915
+ (ctx) => updateChartUserShapeT(ctx, params)
3916
+ );
3917
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3918
+ }
3919
+ );
3920
+ server2.registerTool(
3921
+ "chart_user_shape_remove",
3922
+ {
3923
+ description: "Remove one of a chart's drawing-overlay shapes by index",
3924
+ inputSchema: RemoveChartUserShapeSchema.shape
3925
+ },
3926
+ async (params) => {
3927
+ const result = await runMcpTool(
3928
+ params.filePath,
3929
+ (ctx) => removeChartUserShapeT(ctx, params)
3930
+ );
3931
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3932
+ }
3933
+ );
3773
3934
  server2.registerTool(
3774
3935
  "manage_smart_art",
3775
3936
  {
@@ -2,7 +2,7 @@
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
4
  import { z } from 'zod';
5
- import { validatePptx, repairPptx, PptxHandler, hasTextProperties, cloneElement as cloneElement$1, isTemplateElementId, makeStoreAwareId, reassignDescendantIds, groupElements as groupElements$1, ungroupElements as ungroupElements$1, PptxMarkdownConverter, ThemePresets, getThemePreset, setChartType, setChartTitle, setChartGrouping, setChartLegend, setChartDataLabels, setChartAxis, setChartCategories, addChartSeries, removeChartSeries, updateChartSeriesValues, ChartBuilder, decomposeSmartArt, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, updateSmartArtNodeText, removeSmartArtNode, addSmartArtNode, findPlaceholders, applyTemplate, getSectionForSlide, moveSlidesToSection, reorderSections, removeSection, addSection, SvgExporter, buildPptxJsonDocument, deserializePptxFromJson, applyImportedPptxData, replaceWithCustomGeometry, replaceShapeGeometry, setElementLocked, findLayoutByName, findLayoutByType } from 'pptx-viewer-core';
5
+ import { validatePptx, repairPptx, PptxHandler, hasTextProperties, cloneElement as cloneElement$1, isTemplateElementId, makeStoreAwareId, reassignDescendantIds, groupElements as groupElements$1, ungroupElements as ungroupElements$1, PptxMarkdownConverter, ThemePresets, getThemePreset, setChartType, setChartTitle, setChartGrouping, setChartLegend, setChartDataLabels, setChartAxis, setChartCategories, addChartSeries, removeChartSeries, updateChartSeriesValues, ChartBuilder, listChartUserShapes, addChartUserShape, updateChartUserShape, removeChartUserShape, decomposeSmartArt, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, updateSmartArtNodeText, removeSmartArtNode, addSmartArtNode, findPlaceholders, applyTemplate, getSectionForSlide, moveSlidesToSection, reorderSections, removeSection, addSection, SvgExporter, buildPptxJsonDocument, deserializePptxFromJson, applyImportedPptxData, replaceWithCustomGeometry, replaceShapeGeometry, setElementLocked, findLayoutByName, findLayoutByType } from 'pptx-viewer-core';
6
6
  import { writeFile, readFile } from 'fs/promises';
7
7
  import { resolve, isAbsolute, sep } from 'path';
8
8
 
@@ -374,6 +374,50 @@ var CreateChartSchema = z.object({
374
374
  position: z.string().optional()
375
375
  }).optional().describe("Legend configuration")
376
376
  });
377
+ var PointSchema = z.object({ x: z.number(), y: z.number() });
378
+ var ExtentSchema = z.object({ cx: z.number(), cy: z.number() });
379
+ var ChartUserShapeInputSchema = z.object({
380
+ kind: z.enum(["sp", "cxnSp"]).optional().describe('Overlay shape kind: "sp" (text/preset shape, default) or "cxnSp" (connector).'),
381
+ anchor: z.enum(["rel", "abs"]).optional().describe(
382
+ 'Anchor kind: "rel" (default, resizes with the chart; needs `to`) or "abs" (fixed EMU size; needs `ext`).'
383
+ ),
384
+ from: PointSchema.describe("Top-left corner as chart-relative fractions (0-1 each)."),
385
+ to: PointSchema.optional().describe(
386
+ "Bottom-right corner as chart-relative fractions; rel anchors only."
387
+ ),
388
+ ext: ExtentSchema.optional().describe("Width/height in EMU; abs anchors only."),
389
+ prst: z.string().optional().describe('Preset geometry name (e.g. "rect", "roundRect"); default "rect".'),
390
+ fill: z.string().optional().describe('Solid fill colour, hex (e.g. "#FFFF00").'),
391
+ stroke: z.string().optional().describe("Line colour, hex."),
392
+ strokeWidth: z.number().optional().describe("Line width in points."),
393
+ text: z.string().optional().describe("Plain text content, centred in the shape.")
394
+ });
395
+ var ListChartUserShapesSchema = z.object({
396
+ filePath: z.string().describe("Path to the PPTX file"),
397
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
398
+ elementId: z.string().describe("Chart element ID")
399
+ });
400
+ var AddChartUserShapeSchema = z.object({
401
+ filePath: z.string().describe("Path to the PPTX file"),
402
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
403
+ elementId: z.string().describe("Chart element ID"),
404
+ shape: ChartUserShapeInputSchema.describe("The overlay shape to add.")
405
+ });
406
+ var UpdateChartUserShapeSchema = z.object({
407
+ filePath: z.string().describe("Path to the PPTX file"),
408
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
409
+ elementId: z.string().describe("Chart element ID"),
410
+ index: z.number().int().min(0).describe("Zero-based overlay-shape index (from chart_user_shape_list)"),
411
+ patch: ChartUserShapeInputSchema.partial().describe(
412
+ "Fields to overwrite; anything omitted is left as-is."
413
+ )
414
+ });
415
+ var RemoveChartUserShapeSchema = z.object({
416
+ filePath: z.string().describe("Path to the PPTX file"),
417
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
418
+ elementId: z.string().describe("Chart element ID"),
419
+ index: z.number().int().min(0).describe("Zero-based overlay-shape index to remove")
420
+ });
377
421
  var ManageSmartArtSchema = z.object({
378
422
  filePath: z.string().describe("Path to the PPTX file"),
379
423
  slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
@@ -793,6 +837,67 @@ function createChart(ctx, params) {
793
837
  result: { elementId: chart.id, slideIndex: params.slideIndex }
794
838
  };
795
839
  }
840
+ function findChartElement(ctx, slideIndex, elementId) {
841
+ const err = validateSlideIndex(slideIndex, ctx.pptxData.slides.length);
842
+ if (err) {
843
+ throw new Error(err);
844
+ }
845
+ const slide = ctx.pptxData.slides[slideIndex];
846
+ const el = slide.elements.find((e) => e.id === elementId);
847
+ if (!el) {
848
+ throw new Error(`Element '${elementId}' not found on slide ${slideIndex}.`);
849
+ }
850
+ if (el.type !== "chart") {
851
+ throw new Error(`Element '${elementId}' is not a chart.`);
852
+ }
853
+ return el;
854
+ }
855
+ function buildShape(input) {
856
+ return {
857
+ kind: input.kind ?? "sp",
858
+ anchor: input.anchor ?? "rel",
859
+ from: input.from,
860
+ ...input.to ? { to: input.to } : {},
861
+ ...input.ext ? { ext: input.ext } : {},
862
+ ...input.prst ? { prst: input.prst } : {},
863
+ ...input.fill ? { fill: input.fill } : {},
864
+ ...input.stroke ? { stroke: input.stroke } : {},
865
+ ...input.strokeWidth !== void 0 ? { strokeWidth: input.strokeWidth } : {},
866
+ ...input.text ? { paragraphs: [{ text: input.text, align: "ctr" }] } : {}
867
+ };
868
+ }
869
+ function listChartUserShapesT(ctx, params) {
870
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
871
+ return { pptxData: ctx.pptxData, dirty: false, result: { shapes: listChartUserShapes(chart) } };
872
+ }
873
+ function addChartUserShapeT(ctx, params) {
874
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
875
+ addChartUserShape(chart, buildShape(params.shape));
876
+ const index = (chart.chartData?.userShapes?.length ?? 1) - 1;
877
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId, index } };
878
+ }
879
+ function updateChartUserShapeT(ctx, params) {
880
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
881
+ const patch = {
882
+ ...params.patch.kind ? { kind: params.patch.kind } : {},
883
+ ...params.patch.anchor ? { anchor: params.patch.anchor } : {},
884
+ ...params.patch.from ? { from: params.patch.from } : {},
885
+ ...params.patch.to ? { to: params.patch.to } : {},
886
+ ...params.patch.ext ? { ext: params.patch.ext } : {},
887
+ ...params.patch.prst ? { prst: params.patch.prst } : {},
888
+ ...params.patch.fill ? { fill: params.patch.fill } : {},
889
+ ...params.patch.stroke ? { stroke: params.patch.stroke } : {},
890
+ ...params.patch.strokeWidth !== void 0 ? { strokeWidth: params.patch.strokeWidth } : {},
891
+ ...params.patch.text !== void 0 ? { paragraphs: [{ text: params.patch.text, align: "ctr" }] } : {}
892
+ };
893
+ updateChartUserShape(chart, params.index, patch);
894
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
895
+ }
896
+ function removeChartUserShapeT(ctx, params) {
897
+ const chart = findChartElement(ctx, params.slideIndex, params.elementId);
898
+ removeChartUserShape(chart, params.index);
899
+ return { pptxData: ctx.pptxData, dirty: true, result: { elementId: params.elementId } };
900
+ }
796
901
  var MAX_REGEX_LEN = 200;
797
902
  function hasNestedUnboundedQuantifier(pattern) {
798
903
  return /\([^)]*[+*]\)[+*]/u.test(pattern);
@@ -3768,6 +3873,62 @@ function createServer() {
3768
3873
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3769
3874
  }
3770
3875
  );
3876
+ server2.registerTool(
3877
+ "chart_user_shape_list",
3878
+ {
3879
+ description: "List a chart's drawing-overlay shapes (c:userShapes)",
3880
+ inputSchema: ListChartUserShapesSchema.shape
3881
+ },
3882
+ async (params) => {
3883
+ const result = await runMcpTool(
3884
+ params.filePath,
3885
+ (ctx) => listChartUserShapesT(ctx, params)
3886
+ );
3887
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3888
+ }
3889
+ );
3890
+ server2.registerTool(
3891
+ "chart_user_shape_add",
3892
+ {
3893
+ description: "Add a drawing-overlay shape (text box or connector) to a chart's c:userShapes",
3894
+ inputSchema: AddChartUserShapeSchema.shape
3895
+ },
3896
+ async (params) => {
3897
+ const result = await runMcpTool(
3898
+ params.filePath,
3899
+ (ctx) => addChartUserShapeT(ctx, params)
3900
+ );
3901
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3902
+ }
3903
+ );
3904
+ server2.registerTool(
3905
+ "chart_user_shape_update",
3906
+ {
3907
+ description: "Move, resize, or restyle one of a chart's drawing-overlay shapes by index",
3908
+ inputSchema: UpdateChartUserShapeSchema.shape
3909
+ },
3910
+ async (params) => {
3911
+ const result = await runMcpTool(
3912
+ params.filePath,
3913
+ (ctx) => updateChartUserShapeT(ctx, params)
3914
+ );
3915
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3916
+ }
3917
+ );
3918
+ server2.registerTool(
3919
+ "chart_user_shape_remove",
3920
+ {
3921
+ description: "Remove one of a chart's drawing-overlay shapes by index",
3922
+ inputSchema: RemoveChartUserShapeSchema.shape
3923
+ },
3924
+ async (params) => {
3925
+ const result = await runMcpTool(
3926
+ params.filePath,
3927
+ (ctx) => removeChartUserShapeT(ctx, params)
3928
+ );
3929
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
3930
+ }
3931
+ );
3771
3932
  server2.registerTool(
3772
3933
  "manage_smart_art",
3773
3934
  {
@@ -410,6 +410,84 @@ declare const CreateChartSchema: z.ZodObject<{
410
410
  }, z.core.$strip>>;
411
411
  }, z.core.$strip>;
412
412
  //#endregion
413
+ //#region src/schemas/chart-user-shape-schemas.d.ts
414
+ declare const ListChartUserShapesSchema: z.ZodObject<{
415
+ filePath: z.ZodString;
416
+ slideIndex: z.ZodNumber;
417
+ elementId: z.ZodString;
418
+ }, z.core.$strip>;
419
+ declare const AddChartUserShapeSchema: z.ZodObject<{
420
+ filePath: z.ZodString;
421
+ slideIndex: z.ZodNumber;
422
+ elementId: z.ZodString;
423
+ shape: z.ZodObject<{
424
+ kind: z.ZodOptional<z.ZodEnum<{
425
+ cxnSp: "cxnSp";
426
+ sp: "sp";
427
+ }>>;
428
+ anchor: z.ZodOptional<z.ZodEnum<{
429
+ abs: "abs";
430
+ rel: "rel";
431
+ }>>;
432
+ from: z.ZodObject<{
433
+ x: z.ZodNumber;
434
+ y: z.ZodNumber;
435
+ }, z.core.$strip>;
436
+ to: z.ZodOptional<z.ZodObject<{
437
+ x: z.ZodNumber;
438
+ y: z.ZodNumber;
439
+ }, z.core.$strip>>;
440
+ ext: z.ZodOptional<z.ZodObject<{
441
+ cx: z.ZodNumber;
442
+ cy: z.ZodNumber;
443
+ }, z.core.$strip>>;
444
+ prst: z.ZodOptional<z.ZodString>;
445
+ fill: z.ZodOptional<z.ZodString>;
446
+ stroke: z.ZodOptional<z.ZodString>;
447
+ strokeWidth: z.ZodOptional<z.ZodNumber>;
448
+ text: z.ZodOptional<z.ZodString>;
449
+ }, z.core.$strip>;
450
+ }, z.core.$strip>;
451
+ declare const UpdateChartUserShapeSchema: z.ZodObject<{
452
+ filePath: z.ZodString;
453
+ slideIndex: z.ZodNumber;
454
+ elementId: z.ZodString;
455
+ index: z.ZodNumber;
456
+ patch: z.ZodObject<{
457
+ kind: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
458
+ cxnSp: "cxnSp";
459
+ sp: "sp";
460
+ }>>>;
461
+ anchor: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
462
+ abs: "abs";
463
+ rel: "rel";
464
+ }>>>;
465
+ from: z.ZodOptional<z.ZodObject<{
466
+ x: z.ZodNumber;
467
+ y: z.ZodNumber;
468
+ }, z.core.$strip>>;
469
+ to: z.ZodOptional<z.ZodOptional<z.ZodObject<{
470
+ x: z.ZodNumber;
471
+ y: z.ZodNumber;
472
+ }, z.core.$strip>>>;
473
+ ext: z.ZodOptional<z.ZodOptional<z.ZodObject<{
474
+ cx: z.ZodNumber;
475
+ cy: z.ZodNumber;
476
+ }, z.core.$strip>>>;
477
+ prst: z.ZodOptional<z.ZodOptional<z.ZodString>>;
478
+ fill: z.ZodOptional<z.ZodOptional<z.ZodString>>;
479
+ stroke: z.ZodOptional<z.ZodOptional<z.ZodString>>;
480
+ strokeWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
481
+ text: z.ZodOptional<z.ZodOptional<z.ZodString>>;
482
+ }, z.core.$strip>;
483
+ }, z.core.$strip>;
484
+ declare const RemoveChartUserShapeSchema: z.ZodObject<{
485
+ filePath: z.ZodString;
486
+ slideIndex: z.ZodNumber;
487
+ elementId: z.ZodString;
488
+ index: z.ZodNumber;
489
+ }, z.core.$strip>;
490
+ //#endregion
413
491
  //#region src/schemas/smartart-schemas.d.ts
414
492
  declare const ManageSmartArtSchema: z.ZodObject<{
415
493
  filePath: z.ZodString;
@@ -604,5 +682,5 @@ declare const ApplyLayoutSchema: z.ZodObject<{
604
682
  layoutType: z.ZodOptional<z.ZodString>;
605
683
  }, z.core.$strip>;
606
684
  //#endregion
607
- export { AccessibilityCheckSchema, AddChartSeriesSchema, AddElementSchema, AddSlideSchema, ApplyLayoutSchema, ApplyTemplateSchema, ApplyThemePresetSchema, ArrangeElementsSchema, BatchUpdateElementsSchema, CloneElementSchema, ConvertToMarkdownSchema, CreateChartSchema, DeleteElementsSchema, DeleteSlidesSchema, DuplicateSlideSchema, ExportSlideSvgSchema, ExportToJsonSchema, ExportToSvgSchema, FindPlaceholdersSchema, FindTextSchema, GetLayoutsSchema, GetMetadataSchema, GetPresentationPropertiesSchema, GetSlideSchema, GetThemeInfoSchema, GroupElementsSchema, ImportFromJsonSchema, ManageCommentsSchema, ManageHyperlinksSchema, ManageSectionsSchema, ManageSmartArtSchema, ManageTableStructureSchema, RemoveChartSeriesSchema, RenameElementSchema, ReorderSlidesSchema, RepairPresentationSchema, ReplaceGeometrySchema, ReplaceTextSchema, SetCanvasSizeSchema, SetElementAnimationSchema, SetElementLockSchema, SetSlideTransitionSchema, UngroupElementsSchema, UpdateChartSchema, UpdateChartSeriesDataSchema, UpdateElementSchema, UpdateElementStyleSchema, UpdateMetadataSchema, UpdatePresentationPropertiesSchema, UpdateSlidePropertiesSchema, UpdateTableCellsSchema, UpdateThemeColorsSchema, UpdateThemeFontsSchema, ValidatePresentationSchema };
685
+ export { AccessibilityCheckSchema, AddChartSeriesSchema, AddChartUserShapeSchema, AddElementSchema, AddSlideSchema, ApplyLayoutSchema, ApplyTemplateSchema, ApplyThemePresetSchema, ArrangeElementsSchema, BatchUpdateElementsSchema, CloneElementSchema, ConvertToMarkdownSchema, CreateChartSchema, DeleteElementsSchema, DeleteSlidesSchema, DuplicateSlideSchema, ExportSlideSvgSchema, ExportToJsonSchema, ExportToSvgSchema, FindPlaceholdersSchema, FindTextSchema, GetLayoutsSchema, GetMetadataSchema, GetPresentationPropertiesSchema, GetSlideSchema, GetThemeInfoSchema, GroupElementsSchema, ImportFromJsonSchema, ListChartUserShapesSchema, ManageCommentsSchema, ManageHyperlinksSchema, ManageSectionsSchema, ManageSmartArtSchema, ManageTableStructureSchema, RemoveChartSeriesSchema, RemoveChartUserShapeSchema, RenameElementSchema, ReorderSlidesSchema, RepairPresentationSchema, ReplaceGeometrySchema, ReplaceTextSchema, SetCanvasSizeSchema, SetElementAnimationSchema, SetElementLockSchema, SetSlideTransitionSchema, UngroupElementsSchema, UpdateChartSchema, UpdateChartSeriesDataSchema, UpdateChartUserShapeSchema, UpdateElementSchema, UpdateElementStyleSchema, UpdateMetadataSchema, UpdatePresentationPropertiesSchema, UpdateSlidePropertiesSchema, UpdateTableCellsSchema, UpdateThemeColorsSchema, UpdateThemeFontsSchema, ValidatePresentationSchema };
608
686
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/schemas/slide-schemas.ts","../../src/schemas/element-schemas.ts","../../src/schemas/table-style-schemas.ts","../../src/schemas/theme-schemas.ts","../../src/schemas/chart-schemas.ts","../../src/schemas/smartart-schemas.ts","../../src/schemas/template-schemas.ts","../../src/schemas/metadata-schemas.ts","../../src/schemas/section-schemas.ts","../../src/schemas/export-schemas.ts","../../src/schemas/json-schemas.ts","../../src/schemas/hyperlink-schemas.ts","../../src/schemas/geomet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A,KAAA;;;cClBW,uBAAqB,EAAA;;;;;;;;;GAehC,EAAA,KAAA;;;cCfW,sBAAoB,EAAA;;;;;;;;;;GAU/B,EAAA,KAAA;;;cCVW,4BAA0B,EAAA;;GAErC,EAAA,KAAA;cAEW,0BAAwB,EAAA;;GAEnC,EAAA,KAAA;;;cCNW,iCAA+B,EAAA;;GAE1C,EAAA,KAAA;cAEW,oCAAkC,EAAA;;;;;;;;;;;;;;;;;;;;;;GAc7C,EAAA,KAAA;;;cClBW,kBAAgB,EAAA;;GAE3B,EAAA,KAAA;cAEW,mBAAiB,EAAA;;;;;GAK5B,EAAA,KAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/schemas/slide-schemas.ts","../../src/schemas/element-schemas.ts","../../src/schemas/table-style-schemas.ts","../../src/schemas/theme-schemas.ts","../../src/schemas/chart-schemas.ts","../../src/schemas/chart-user-shape-schemas.ts","../../src/schemas/smartart-schemas.ts","../../src/schemas/template-schemas.ts","../../src/schemas/metadata-schemas.ts","../../src/schemas/section-schemas.ts","../../src/schemas/export-schemas.ts","../../src/schemas/json-schemas.ts","../../src/schemas/hyperlink-schemas.ts","../../src/schemas/geometry-schemas.ts","../../src/schemas/lock-schemas.ts","../../src/schemas/validation-schemas.ts","../../src/schemas/presentation-schemas.ts","../../src/schemas/layout-schemas.ts"],"mappings":";;cAEa,gBAAc,EAAA;;;GAGzB,EAAA,KAAA;cAEW,gBAAc,EAAA;;;;GAIzB,EAAA,KAAA;cAEW,oBAAkB,EAAA;;;GAG7B,EAAA,KAAA;cAEW,qBAAmB,EAAA;;;GAG9B,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;GAI/B,EAAA,KAAA;cAEW,6BAA2B,EAAA;;;;;;;;GAQtC,EAAA,KAAA;cAEW,0BAAwB,EAAA;;;;;;;;GAQnC,EAAA,KAAA;cAEW,qBAAmB,EAAA;;;;GAI9B,EAAA,KAAA;cAEW,yBAAuB,EAAA;;;;;;;;;;;GAclC,EAAA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;;;;;;;;;;;;;;;;;;;;;;GAc7C,EAAA,KAAA;;;cClBW,kBAAgB,EAAA;;GAE3B,EAAA,KAAA;cAEW,mBAAiB,EAAA;;;;;GAK5B,EAAA,KAAA"}
@@ -371,6 +371,50 @@ var CreateChartSchema = zod.z.object({
371
371
  position: zod.z.string().optional()
372
372
  }).optional().describe("Legend configuration")
373
373
  });
374
+ var PointSchema = zod.z.object({ x: zod.z.number(), y: zod.z.number() });
375
+ var ExtentSchema = zod.z.object({ cx: zod.z.number(), cy: zod.z.number() });
376
+ var ChartUserShapeInputSchema = zod.z.object({
377
+ kind: zod.z.enum(["sp", "cxnSp"]).optional().describe('Overlay shape kind: "sp" (text/preset shape, default) or "cxnSp" (connector).'),
378
+ anchor: zod.z.enum(["rel", "abs"]).optional().describe(
379
+ 'Anchor kind: "rel" (default, resizes with the chart; needs `to`) or "abs" (fixed EMU size; needs `ext`).'
380
+ ),
381
+ from: PointSchema.describe("Top-left corner as chart-relative fractions (0-1 each)."),
382
+ to: PointSchema.optional().describe(
383
+ "Bottom-right corner as chart-relative fractions; rel anchors only."
384
+ ),
385
+ ext: ExtentSchema.optional().describe("Width/height in EMU; abs anchors only."),
386
+ prst: zod.z.string().optional().describe('Preset geometry name (e.g. "rect", "roundRect"); default "rect".'),
387
+ fill: zod.z.string().optional().describe('Solid fill colour, hex (e.g. "#FFFF00").'),
388
+ stroke: zod.z.string().optional().describe("Line colour, hex."),
389
+ strokeWidth: zod.z.number().optional().describe("Line width in points."),
390
+ text: zod.z.string().optional().describe("Plain text content, centred in the shape.")
391
+ });
392
+ var ListChartUserShapesSchema = zod.z.object({
393
+ filePath: zod.z.string().describe("Path to the PPTX file"),
394
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
395
+ elementId: zod.z.string().describe("Chart element ID")
396
+ });
397
+ var AddChartUserShapeSchema = zod.z.object({
398
+ filePath: zod.z.string().describe("Path to the PPTX file"),
399
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
400
+ elementId: zod.z.string().describe("Chart element ID"),
401
+ shape: ChartUserShapeInputSchema.describe("The overlay shape to add.")
402
+ });
403
+ var UpdateChartUserShapeSchema = zod.z.object({
404
+ filePath: zod.z.string().describe("Path to the PPTX file"),
405
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
406
+ elementId: zod.z.string().describe("Chart element ID"),
407
+ index: zod.z.number().int().min(0).describe("Zero-based overlay-shape index (from chart_user_shape_list)"),
408
+ patch: ChartUserShapeInputSchema.partial().describe(
409
+ "Fields to overwrite; anything omitted is left as-is."
410
+ )
411
+ });
412
+ var RemoveChartUserShapeSchema = zod.z.object({
413
+ filePath: zod.z.string().describe("Path to the PPTX file"),
414
+ slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
415
+ elementId: zod.z.string().describe("Chart element ID"),
416
+ index: zod.z.number().int().min(0).describe("Zero-based overlay-shape index to remove")
417
+ });
374
418
  var ManageSmartArtSchema = zod.z.object({
375
419
  filePath: zod.z.string().describe("Path to the PPTX file"),
376
420
  slideIndex: zod.z.number().int().min(0).describe("Zero-based slide index"),
@@ -513,6 +557,7 @@ var ApplyLayoutSchema = zod.z.object({
513
557
 
514
558
  exports.AccessibilityCheckSchema = AccessibilityCheckSchema;
515
559
  exports.AddChartSeriesSchema = AddChartSeriesSchema;
560
+ exports.AddChartUserShapeSchema = AddChartUserShapeSchema;
516
561
  exports.AddElementSchema = AddElementSchema;
517
562
  exports.AddSlideSchema = AddSlideSchema;
518
563
  exports.ApplyLayoutSchema = ApplyLayoutSchema;
@@ -538,12 +583,14 @@ exports.GetSlideSchema = GetSlideSchema;
538
583
  exports.GetThemeInfoSchema = GetThemeInfoSchema;
539
584
  exports.GroupElementsSchema = GroupElementsSchema;
540
585
  exports.ImportFromJsonSchema = ImportFromJsonSchema;
586
+ exports.ListChartUserShapesSchema = ListChartUserShapesSchema;
541
587
  exports.ManageCommentsSchema = ManageCommentsSchema;
542
588
  exports.ManageHyperlinksSchema = ManageHyperlinksSchema;
543
589
  exports.ManageSectionsSchema = ManageSectionsSchema;
544
590
  exports.ManageSmartArtSchema = ManageSmartArtSchema;
545
591
  exports.ManageTableStructureSchema = ManageTableStructureSchema;
546
592
  exports.RemoveChartSeriesSchema = RemoveChartSeriesSchema;
593
+ exports.RemoveChartUserShapeSchema = RemoveChartUserShapeSchema;
547
594
  exports.RenameElementSchema = RenameElementSchema;
548
595
  exports.ReorderSlidesSchema = ReorderSlidesSchema;
549
596
  exports.RepairPresentationSchema = RepairPresentationSchema;
@@ -556,6 +603,7 @@ exports.SetSlideTransitionSchema = SetSlideTransitionSchema;
556
603
  exports.UngroupElementsSchema = UngroupElementsSchema;
557
604
  exports.UpdateChartSchema = UpdateChartSchema;
558
605
  exports.UpdateChartSeriesDataSchema = UpdateChartSeriesDataSchema;
606
+ exports.UpdateChartUserShapeSchema = UpdateChartUserShapeSchema;
559
607
  exports.UpdateElementSchema = UpdateElementSchema;
560
608
  exports.UpdateElementStyleSchema = UpdateElementStyleSchema;
561
609
  exports.UpdateMetadataSchema = UpdateMetadataSchema;
@@ -369,6 +369,50 @@ var CreateChartSchema = z.object({
369
369
  position: z.string().optional()
370
370
  }).optional().describe("Legend configuration")
371
371
  });
372
+ var PointSchema = z.object({ x: z.number(), y: z.number() });
373
+ var ExtentSchema = z.object({ cx: z.number(), cy: z.number() });
374
+ var ChartUserShapeInputSchema = z.object({
375
+ kind: z.enum(["sp", "cxnSp"]).optional().describe('Overlay shape kind: "sp" (text/preset shape, default) or "cxnSp" (connector).'),
376
+ anchor: z.enum(["rel", "abs"]).optional().describe(
377
+ 'Anchor kind: "rel" (default, resizes with the chart; needs `to`) or "abs" (fixed EMU size; needs `ext`).'
378
+ ),
379
+ from: PointSchema.describe("Top-left corner as chart-relative fractions (0-1 each)."),
380
+ to: PointSchema.optional().describe(
381
+ "Bottom-right corner as chart-relative fractions; rel anchors only."
382
+ ),
383
+ ext: ExtentSchema.optional().describe("Width/height in EMU; abs anchors only."),
384
+ prst: z.string().optional().describe('Preset geometry name (e.g. "rect", "roundRect"); default "rect".'),
385
+ fill: z.string().optional().describe('Solid fill colour, hex (e.g. "#FFFF00").'),
386
+ stroke: z.string().optional().describe("Line colour, hex."),
387
+ strokeWidth: z.number().optional().describe("Line width in points."),
388
+ text: z.string().optional().describe("Plain text content, centred in the shape.")
389
+ });
390
+ var ListChartUserShapesSchema = z.object({
391
+ filePath: z.string().describe("Path to the PPTX file"),
392
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
393
+ elementId: z.string().describe("Chart element ID")
394
+ });
395
+ var AddChartUserShapeSchema = z.object({
396
+ filePath: z.string().describe("Path to the PPTX file"),
397
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
398
+ elementId: z.string().describe("Chart element ID"),
399
+ shape: ChartUserShapeInputSchema.describe("The overlay shape to add.")
400
+ });
401
+ var UpdateChartUserShapeSchema = z.object({
402
+ filePath: z.string().describe("Path to the PPTX file"),
403
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
404
+ elementId: z.string().describe("Chart element ID"),
405
+ index: z.number().int().min(0).describe("Zero-based overlay-shape index (from chart_user_shape_list)"),
406
+ patch: ChartUserShapeInputSchema.partial().describe(
407
+ "Fields to overwrite; anything omitted is left as-is."
408
+ )
409
+ });
410
+ var RemoveChartUserShapeSchema = z.object({
411
+ filePath: z.string().describe("Path to the PPTX file"),
412
+ slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
413
+ elementId: z.string().describe("Chart element ID"),
414
+ index: z.number().int().min(0).describe("Zero-based overlay-shape index to remove")
415
+ });
372
416
  var ManageSmartArtSchema = z.object({
373
417
  filePath: z.string().describe("Path to the PPTX file"),
374
418
  slideIndex: z.number().int().min(0).describe("Zero-based slide index"),
@@ -509,4 +553,4 @@ var ApplyLayoutSchema = z.object({
509
553
  layoutType: z.string().optional().describe("Layout type to apply (alternative to name)")
510
554
  });
511
555
 
512
- export { AccessibilityCheckSchema, AddChartSeriesSchema, AddElementSchema, AddSlideSchema, ApplyLayoutSchema, ApplyTemplateSchema, ApplyThemePresetSchema, ArrangeElementsSchema, BatchUpdateElementsSchema, CloneElementSchema, ConvertToMarkdownSchema, CreateChartSchema, DeleteElementsSchema, DeleteSlidesSchema, DuplicateSlideSchema, ExportSlideSvgSchema, ExportToJsonSchema, ExportToSvgSchema, FindPlaceholdersSchema, FindTextSchema, GetLayoutsSchema, GetMetadataSchema, GetPresentationPropertiesSchema, GetSlideSchema, GetThemeInfoSchema, GroupElementsSchema, ImportFromJsonSchema, ManageCommentsSchema, ManageHyperlinksSchema, ManageSectionsSchema, ManageSmartArtSchema, ManageTableStructureSchema, RemoveChartSeriesSchema, RenameElementSchema, ReorderSlidesSchema, RepairPresentationSchema, ReplaceGeometrySchema, ReplaceTextSchema, SetCanvasSizeSchema, SetElementAnimationSchema, SetElementLockSchema, SetSlideTransitionSchema, UngroupElementsSchema, UpdateChartSchema, UpdateChartSeriesDataSchema, UpdateElementSchema, UpdateElementStyleSchema, UpdateMetadataSchema, UpdatePresentationPropertiesSchema, UpdateSlidePropertiesSchema, UpdateTableCellsSchema, UpdateThemeColorsSchema, UpdateThemeFontsSchema, ValidatePresentationSchema };
556
+ export { AccessibilityCheckSchema, AddChartSeriesSchema, AddChartUserShapeSchema, AddElementSchema, AddSlideSchema, ApplyLayoutSchema, ApplyTemplateSchema, ApplyThemePresetSchema, ArrangeElementsSchema, BatchUpdateElementsSchema, CloneElementSchema, ConvertToMarkdownSchema, CreateChartSchema, DeleteElementsSchema, DeleteSlidesSchema, DuplicateSlideSchema, ExportSlideSvgSchema, ExportToJsonSchema, ExportToSvgSchema, FindPlaceholdersSchema, FindTextSchema, GetLayoutsSchema, GetMetadataSchema, GetPresentationPropertiesSchema, GetSlideSchema, GetThemeInfoSchema, GroupElementsSchema, ImportFromJsonSchema, ListChartUserShapesSchema, ManageCommentsSchema, ManageHyperlinksSchema, ManageSectionsSchema, ManageSmartArtSchema, ManageTableStructureSchema, RemoveChartSeriesSchema, RemoveChartUserShapeSchema, RenameElementSchema, ReorderSlidesSchema, RepairPresentationSchema, ReplaceGeometrySchema, ReplaceTextSchema, SetCanvasSizeSchema, SetElementAnimationSchema, SetElementLockSchema, SetSlideTransitionSchema, UngroupElementsSchema, UpdateChartSchema, UpdateChartSeriesDataSchema, UpdateChartUserShapeSchema, UpdateElementSchema, UpdateElementStyleSchema, UpdateMetadataSchema, UpdatePresentationPropertiesSchema, UpdateSlidePropertiesSchema, UpdateTableCellsSchema, UpdateThemeColorsSchema, UpdateThemeFontsSchema, ValidatePresentationSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-viewer-mcp",
3
- "version": "2.1.6",
3
+ "version": "2.2.0",
4
4
  "description": "PowerPoint PPTX tools and MCP server: manipulate, convert, and collaborate on .pptx files from AI agents.",
5
5
  "keywords": [
6
6
  "ai",
@@ -70,9 +70,9 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@modelcontextprotocol/sdk": "^1.30.0",
73
- "fast-xml-parser": "^5.10.1",
73
+ "fast-xml-parser": "^5.11.0",
74
74
  "jszip": "^3.10.1",
75
- "pptx-viewer-core": "^3.0.1",
75
+ "pptx-viewer-core": "^3.4.0",
76
76
  "zod": "^4.4.3"
77
77
  },
78
78
  "devDependencies": {