@presentation-md/mcp-server 1.25.1 → 1.26.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/README.md +1 -1
- package/dist/tools/apply-theme.js +19 -5
- package/dist/tools/apply-theme.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ replace it with the block above (or re-run `npx @presentation-md/install cursor`
|
|
|
38
38
|
| `render_deck` | Render a deck JSON spec to a self-contained HTML slide deck; optionally write to a file. |
|
|
39
39
|
| `export_deck` | Export deck JSON to native, editable PowerPoint (`.pptx`), vector PDF, or HTML. |
|
|
40
40
|
| `list_themes` | List installed themes (name, version, vibe, description). Optional `shortlist` / `browse` (site/Studio mood chips) / `mood` / `query` filters + `include_shortlists` / `include_browse_filters`. Returns `suggested_preview` (safe/bold/wildcard trio) for one-shot Theme Discovery. |
|
|
41
|
-
| `apply_theme` | Swap
|
|
41
|
+
| `apply_theme` | Swap `meta.theme` (default: also `repairCraft` for theme-honesty / craft floors; Studio My deck Use parity). |
|
|
42
42
|
| `audit_deck` | Schema validate **plus** craft gates (asymmetry, loud/atmosphere/paper honesty, dual CTA, data beats). Optional `apply_safe_fixes` auto-repairs structural craft **and inserts missing beats** (image-hero / comparison / data / logo-wall / wrap tones) — returns `json` + `fixes_applied[]`. Schema-valid ≠ shippable — call before the user sees a first draft. |
|
|
43
43
|
| `judge_deck` | Craft QA tiers: `t1` schema gates, `t2` HTML metrics + screenshots (**inline PNGs** by default), `t3` agent rubric / panel when keys exist. |
|
|
44
44
|
| `generate_deck_prompt` | Build a one-shot craft system prompt (theme palette, anti-slop, layout recipes, custom-html recipes, shortlists) + optional `density` (`speaker` / `reading`) lock. |
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
import { repairCraft } from "@presentation-md/core";
|
|
1
2
|
export const applyThemeTool = {
|
|
2
3
|
name: "apply_theme",
|
|
3
|
-
description: "Re-theme an existing deck JSON — swap
|
|
4
|
+
description: "Re-theme an existing deck JSON — swap meta.theme while keeping slide copy. By default runs repairCraft so theme-honesty / craft floors clear in one hop (Studio My deck Use parity). Pass apply_safe_fixes:false for a pure theme swap.",
|
|
4
5
|
inputSchema: {
|
|
5
6
|
type: "object",
|
|
6
7
|
properties: {
|
|
7
8
|
json: { type: "string", description: "Deck JSON string" },
|
|
8
|
-
target_theme: { type: "string", description: "Theme name to apply" }
|
|
9
|
+
target_theme: { type: "string", description: "Theme name to apply" },
|
|
10
|
+
apply_safe_fixes: {
|
|
11
|
+
type: "boolean",
|
|
12
|
+
description: "When true (default), run repairCraft after the theme swap — beat inserts + field fixes for the new theme's honesty gates. Set false to only change meta.theme.",
|
|
13
|
+
},
|
|
9
14
|
},
|
|
10
|
-
required: ["json", "target_theme"]
|
|
15
|
+
required: ["json", "target_theme"],
|
|
11
16
|
},
|
|
12
17
|
handler: async (input) => {
|
|
13
18
|
const rawJson = input["json"];
|
|
14
19
|
const targetTheme = input["target_theme"];
|
|
20
|
+
const applyFixes = input["apply_safe_fixes"] !== false;
|
|
15
21
|
let deck;
|
|
16
22
|
try {
|
|
17
23
|
deck = JSON.parse(rawJson);
|
|
@@ -22,7 +28,15 @@ export const applyThemeTool = {
|
|
|
22
28
|
const meta = (deck["meta"] ?? {});
|
|
23
29
|
meta["theme"] = targetTheme;
|
|
24
30
|
deck["meta"] = meta;
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
if (!applyFixes) {
|
|
32
|
+
return { json: JSON.stringify(deck, null, 2), theme: targetTheme, fixes_applied: [] };
|
|
33
|
+
}
|
|
34
|
+
const { deck: repaired, fixes } = repairCraft(deck);
|
|
35
|
+
return {
|
|
36
|
+
json: JSON.stringify(repaired, null, 2),
|
|
37
|
+
theme: targetTheme,
|
|
38
|
+
fixes_applied: fixes,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
27
41
|
};
|
|
28
42
|
//# sourceMappingURL=apply-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-theme.js","sourceRoot":"","sources":["../../src/tools/apply-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-theme.js","sourceRoot":"","sources":["../../src/tools/apply-theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,yOAAyO;IAC3O,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACzD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;YACpE,gBAAgB,EAAE;gBAChB,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,gKAAgK;aACnK;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;KACnC;IACD,OAAO,EAAE,KAAK,EAAE,KAA8B,EAAE,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAW,CAAC;QACxC,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAW,CAAC;QACpD,MAAM,UAAU,GAAG,KAAK,CAAC,kBAAkB,CAAC,KAAK,KAAK,CAAC;QAEvD,IAAI,IAA6B,CAAC;QAClC,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAA4B,CAAC;QACxD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,iBAAkB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAA4B,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,EAAc,EAAE,CAAC;QACpG,CAAC;QAED,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QACpD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvC,KAAK,EAAE,WAAW;YAClB,aAAa,EAAE,KAAK;SACrB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@presentation-md/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "MCP server exposing all 12 presentation-md tools (render/export/audit/judge/scaffold/import/preview) to any MCP-compatible AI agent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
16
16
|
"zod": "^3.23.0",
|
|
17
|
-
"@presentation-md/core": "1.22.
|
|
18
|
-
"@presentation-md/create-theme": "1.1.
|
|
19
|
-
"@presentation-md/export": "^1.23.
|
|
20
|
-
"@presentation-md/render": "1.9.
|
|
17
|
+
"@presentation-md/core": "1.22.3",
|
|
18
|
+
"@presentation-md/create-theme": "1.1.21",
|
|
19
|
+
"@presentation-md/export": "^1.23.21",
|
|
20
|
+
"@presentation-md/render": "1.9.8"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.0.0",
|