You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement AGENTS.md changes: position data + shapeId targeting
Per AGENTS.md (written by a prior agent session):
- get_slide, get_selected_slide, get_shapes already had position data
added (left/top/width/height); confirmed those are already present.
- set_shape_position: add shapeId param (preferred) alongside existing
shapeIndex. Loads all shapes and finds by id when shapeId is supplied.
- delete_shape: same — add shapeId param alongside shapeIndex.
This enables the recommended AGENTS.md workflow:
1. get_slide → read shape ids + positions
2. set_shape_position / delete_shape by id (no index shifting risk)
3. get_slide again to confirm
Co-Authored-By: Claude (claude-sonnet-4-6) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/taskpane/lib/pptx-tools.ts
+68-15Lines changed: 68 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ const tools: PptxTool[] = [
91
91
schema: {
92
92
name: "get_slide",
93
93
description:
94
-
"Get the contents of a specific slide by its 0-based index. Returns all shapes with their names, IDs, types, and text content.",
94
+
"Get the contents of a specific slide by its 0-based index. Returns all shapes with their names, IDs, types, position/size (left, top, width, height in points), and text content.",
"Get the currently selected slide(s) in the presentation. Returns shapes and text on the first selected slide.",
152
+
"Get the currently selected slide(s) in the presentation. Returns shapes with their names, IDs, types, position/size (left, top, width, height in points), and text on the first selected slide.",
thrownewError("Provide either shapeId or shapeIndex.");
721
+
}
692
722
693
723
awaitcontext.sync();
694
724
@@ -855,17 +885,21 @@ const tools: PptxTool[] = [
855
885
schema: {
856
886
name: "set_shape_position",
857
887
description:
858
-
"Move and/or resize a shape on a slide by setting its left, top, width, and/or height (in points). All position/size properties are optional — supply only the ones you want to change.",
888
+
"Move and/or resize a shape on a slide by setting its left, top, width, and/or height (in points). Identify the shape by shapeId (preferred — use the id returned by get_slide/get_shapes) OR by shapeIndex. All position/size properties are optional — supply only the ones you want to change.",
859
889
parameters: {
860
890
type: "object",
861
891
properties: {
862
892
slideIndex: {
863
893
type: "number",
864
894
description: "0-based index of the slide.",
865
895
},
896
+
shapeId: {
897
+
type: "string",
898
+
description: "ID of the shape (from get_slide / get_shapes). Preferred over shapeIndex.",
899
+
},
866
900
shapeIndex: {
867
901
type: "number",
868
-
description: "0-based index of the shape on the slide.",
902
+
description: "0-based index of the shape. Used only when shapeId is not available.",
0 commit comments