Skip to content

Commit 27de814

Browse files
committed
docs(slides): add layout principles to createFromJson tool description
Adds concise layout guidance to the tool description so agents understand the 720x405 grid, layer ordering, padding conventions, font size hierarchy, and theme alias usage without needing a separate skill loaded. Principles-based, not rigid recipes.
1 parent 02d8da7 commit 27de814

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

workspace-server/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ async function main() {
598598
'slides.createFromJson',
599599
{
600600
description:
601-
'Creates one or more slides in a presentation from a JSON blueprint. Supports two formats: (1) { "slides": [{ "elements": [...] }, ...] } for multiple slides, or (2) { "elements": [...] } for a single slide. Elements are positioned on a 720x405 point grid. Each element has: type ("text"|"shape"|"image"), position ({x,y,w,h} in points), optional content (string), optional shape_type (e.g. "RECTANGLE","TEXT_BOX"), optional url (for images), optional layer (z-index), optional style ({size,bold,italic,underline,strikethrough,align,vertical_align,indent,color,bg_color,border_color,border_weight,no_border,font_family,bold_phrases,bold_until,links}). Colors are RGB 0-1 objects ({red,green,blue}) OR named aliases when a theme is active: "primary","primary_text","secondary","secondary_text","surface","surface_alt","text","text_muted","background". Set font_family to "theme" to inherit the theme font. Built-in themes: "google" (Google Blue/Green, Google Sans), "minimal" (dark grey, Arial), "dark" (dark background, blue accent, Arial). Image URLs with unresolved placeholders are replaced with a fallback icon.',
601+
'Creates one or more slides in a presentation from a JSON blueprint.\n\nFORMATS: {"slides":[{"elements":[...]},...]} for multiple slides, or {"elements":[...]} for a single slide.\n\nCANVAS: 720×405 pt (16:9). Origin is top-left.\n\nELEMENT TYPES: type ("text"|"shape"|"image"), position ({x,y,w,h} in points), optional content, shape_type (e.g. "RECTANGLE","TEXT_BOX"), url (images), layer (z-index).\n\nLAYOUT PRINCIPLES:\n- Render order: place background shapes at low layer values (0), content boxes at 1, text at 2+. Shapes always render before text at the same layer.\n- Padding: ~18pt from edges is a safe margin. Header bars typically span full width (x=0 w=720).\n- Header height: 50-60pt is readable; leave ~8pt vertical padding for text inside.\n- Content area: starts where the header ends. Use consistent left margin (18pt) across all elements.\n- Prefer theme color aliases ("primary", "surface", "text") over hardcoded RGB — makes slides cohesive and easy to restyle.\n- Size hierarchy: titles 18-24pt bold, subheadings 12-14pt, body 10-12pt.\n\nSTYLE PROPERTIES: size, bold, italic, underline, strikethrough, align (START|CENTER|END), vertical_align (TOP|MIDDLE|BOTTOM), indent, color, bg_color, border_color, border_weight, no_border, font_family ("theme" to use theme default), bold_phrases (array of substrings to bold), bold_until (char index), links ([{text,url}]).\n\nCOLORS: RGB 0-1 objects ({red,green,blue}) OR named aliases when theme active: "primary","primary_text","secondary","secondary_text","surface","surface_alt","text","text_muted","background".\n\nTHEMES: "light" (default — neutral, Arial), "google" (Blue #1A73E8, Green #34A853, Google Sans), "dark". Image URLs with unresolved template placeholders are replaced with a fallback icon.',
602602
inputSchema: {
603603
presentationId: z
604604
.string()

0 commit comments

Comments
 (0)