@typeflowus/mcp-server 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/index.js +15 -21
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -46,28 +46,28 @@ async function apiRequest(method, path, body) {
|
|
|
46
46
|
|
|
47
47
|
const server = new McpServer({
|
|
48
48
|
name: "typeflow",
|
|
49
|
-
version: "0.1.
|
|
50
|
-
instructions:
|
|
49
|
+
version: "0.1.1",
|
|
50
|
+
instructions: "TypeFlow MCP Server for creating HTML/CSS PDF templates. IMPORTANT: You MUST call the get_template_guide tool before creating or updating any template. This is mandatory - the guide contains all the rules for generating compatible HTML.",
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
// ============================================================
|
|
54
|
-
//
|
|
54
|
+
// Tool: get_template_guide
|
|
55
55
|
// ============================================================
|
|
56
56
|
|
|
57
|
-
server.
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
server.tool(
|
|
58
|
+
"get_template_guide",
|
|
59
|
+
"Returns the COMPLETE TypeFlow template creation guide with all HTML/CSS rules, variable syntax, loop structures, image handling, and examples. You MUST call this before creating or updating any template.",
|
|
60
|
+
{},
|
|
61
|
+
async () => {
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
65
|
type: "text",
|
|
66
66
|
text: TEMPLATE_CREATION_PROMPT,
|
|
67
67
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
71
|
);
|
|
72
72
|
|
|
73
73
|
// ============================================================
|
|
@@ -78,13 +78,7 @@ server.tool(
|
|
|
78
78
|
"create_template",
|
|
79
79
|
`Create a new HTML template in the user's TypeFlow template library.
|
|
80
80
|
|
|
81
|
-
IMPORTANT: You MUST
|
|
82
|
-
- ALL text must be wrapped in <span data-gjs-type="text">
|
|
83
|
-
- Loops use class="loop_0" on the <tr>, with {{loop_0}} before the first variable in the first <td>
|
|
84
|
-
- Tables need class="table-body" on <tbody> and table-layout: fixed
|
|
85
|
-
- NO Handlebars/Mustache syntax (no {{#each}}, no {{#loop_0}}...{{/loop_0}})
|
|
86
|
-
- Use CSS classes on every element, no inline styles
|
|
87
|
-
- Use print-color-adjust: exact on colored elements
|
|
81
|
+
IMPORTANT: You MUST call get_template_guide first before generating any HTML. The guide contains all the rules you need.
|
|
88
82
|
|
|
89
83
|
The template is saved to the library and can later be used when creating flows in TypeFlow.`,
|
|
90
84
|
{
|