@doublehitgames/gdd-mcp 0.4.1

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/dist/tools.js ADDED
@@ -0,0 +1,280 @@
1
+ /**
2
+ * MCP tool definitions for GDD Manager.
3
+ *
4
+ * Each tool maps to a REST API endpoint. The McpServer.tool() method
5
+ * takes (name, description, zodSchema, callback).
6
+ */
7
+ import { z } from "zod/v3";
8
+ import { GddApiError } from "./client.js";
9
+ function text(content) {
10
+ return { content: [{ type: "text", text: content }] };
11
+ }
12
+ function json(data) {
13
+ return text(JSON.stringify(data, null, 2));
14
+ }
15
+ function err(e) {
16
+ if (e instanceof GddApiError) {
17
+ return { content: [{ type: "text", text: `Error (${e.code}): ${e.message}` }], isError: true };
18
+ }
19
+ return { content: [{ type: "text", text: String(e) }], isError: true };
20
+ }
21
+ export function registerTools(server, client) {
22
+ // ── Projects ────────────────────────────────────────────────────
23
+ server.tool("list_projects", "List all GDD projects you have access to (owned and shared)", {}, async () => {
24
+ try {
25
+ return json(await client.listProjects());
26
+ }
27
+ catch (e) {
28
+ return err(e);
29
+ }
30
+ });
31
+ server.tool("get_project", "Get a project with all its sections and addons", { projectId: z.string().describe("Project UUID") }, async ({ projectId }) => {
32
+ try {
33
+ return json(await client.getProject(projectId));
34
+ }
35
+ catch (e) {
36
+ return err(e);
37
+ }
38
+ });
39
+ server.tool("create_project", "Create a new GDD project", {
40
+ title: z.string().describe("Project title"),
41
+ description: z.string().optional().describe("Project description"),
42
+ }, async (params) => {
43
+ try {
44
+ return json(await client.createProject(params));
45
+ }
46
+ catch (e) {
47
+ return err(e);
48
+ }
49
+ });
50
+ server.tool("update_project", "Update project metadata (title, description, cover image, or mindmap settings)", {
51
+ projectId: z.string().describe("Project UUID"),
52
+ title: z.string().optional().describe("New title"),
53
+ description: z.string().optional().describe("New description"),
54
+ coverImageUrl: z.string().optional().describe("Cover image URL"),
55
+ aiInstructions: z.string().optional().describe("AI instructions — conventions for how AI should structure data in this project"),
56
+ }, async ({ projectId, ...fields }) => {
57
+ try {
58
+ return json(await client.updateProject(projectId, fields));
59
+ }
60
+ catch (e) {
61
+ return err(e);
62
+ }
63
+ });
64
+ server.tool("delete_project", "Delete a project and all its sections (owner only, irreversible)", { projectId: z.string().describe("Project UUID") }, async ({ projectId }) => {
65
+ try {
66
+ return json(await client.deleteProject(projectId));
67
+ }
68
+ catch (e) {
69
+ return err(e);
70
+ }
71
+ });
72
+ server.tool("list_linked_spreadsheets", "List the Google Spreadsheets registered in a project's settings (Linked Spreadsheets). Returns each spreadsheet's id (the UUID to set as a section's linkedSpreadsheetId), name, url, spreadsheetId, sheets (tab names), and columnsBySheet (header row per tab). Use this to discover the UUID and the exact sheet/column names needed to build field bindings. Leaner than get_project when you only need spreadsheet metadata. " +
73
+ "NOTES on columnsBySheet: (1) It is keyed by tab name and each value is the tab's row-1 headers as an array that is POSITION-ALIGNED to the column index — array index 0 = column A, 1 = B, 2 = C, etc. Leading empty columns appear as empty strings (e.g. ['','','Name'] means the 'Name' header is in column C). (2) A tab is OMITTED from columnsBySheet when its row 1 is entirely empty, so columnsBySheet may have FEWER keys than `sheets` — never assume every tab in `sheets` has a columnsBySheet entry. (3) columnsBySheet is a SNAPSHOT captured when the spreadsheet was registered/refreshed, not live — added columns won't appear until refreshed. (4) The field is optional: spreadsheets registered before this feature (or never refreshed) may lack columnsBySheet entirely. When columns are missing or stale, ask the user to open Project Settings → Linked Spreadsheets and click 'Atualizar abas' (refresh) on that spreadsheet.", { projectId: z.string().describe("Project UUID") }, async ({ projectId }) => {
74
+ try {
75
+ return json(await client.listLinkedSpreadsheets(projectId));
76
+ }
77
+ catch (e) {
78
+ return err(e);
79
+ }
80
+ });
81
+ // ── Sections ────────────────────────────────────────────────────
82
+ server.tool("list_sections", "List all sections of a project, sorted by order", { projectId: z.string().describe("Project UUID") }, async ({ projectId }) => {
83
+ try {
84
+ return json(await client.listSections(projectId));
85
+ }
86
+ catch (e) {
87
+ return err(e);
88
+ }
89
+ });
90
+ server.tool("get_section", "Get a single section with its addons", {
91
+ projectId: z.string().describe("Project UUID"),
92
+ sectionId: z.string().describe("Section UUID"),
93
+ }, async ({ projectId, sectionId }) => {
94
+ try {
95
+ return json(await client.getSection(projectId, sectionId));
96
+ }
97
+ catch (e) {
98
+ return err(e);
99
+ }
100
+ });
101
+ const CONTENT_BLOCKS_DESC = "Rich BlockNote JSON blocks for the section description. " +
102
+ "Takes priority over auto-generating from `content`. " +
103
+ "Always also provide `content` as a plain-text/markdown mirror used for search and fallback. " +
104
+ "\n\nEach block: { type, props?, content, children }. " +
105
+ "\n\nSUPPORTED BLOCK TYPES:" +
106
+ "\n• paragraph — { type:'paragraph', content:[...inline], children:[] }" +
107
+ "\n• heading — { type:'heading', props:{level:1|2|3}, content:[...inline], children:[] }" +
108
+ "\n• bulletListItem — { type:'bulletListItem', content:[...inline], children:[] }" +
109
+ "\n• numberedListItem — { type:'numberedListItem', content:[...inline], children:[] }" +
110
+ "\n• checkListItem — { type:'checkListItem', props:{checked:false}, content:[...inline], children:[] }" +
111
+ "\n• quote — { type:'quote', content:[...inline], children:[] }" +
112
+ "\n• codeBlock — { type:'codeBlock', props:{language:'javascript'}, content:[{type:'text',text:'...'}], children:[] }" +
113
+ "\n• callout — { type:'callout', props:{emoji:'💡',variant:'info'|'warning'|'error'|'success'}, content:[...inline], children:[] }" +
114
+ "\n• image — { type:'image', props:{url:'https://...',caption:'',width:512}, content:[], children:[] }" +
115
+ "\n• table — { type:'table', content:{type:'tableContent',rows:[{cells:[[...inline],[...inline]]}]}, children:[] }" +
116
+ "\n\nINLINE CONTENT (used in `content` arrays of most blocks):" +
117
+ "\n• Text node: { type:'text', text:'Hello', styles:{bold?:true, italic?:true, underline?:true, strikethrough?:true, code?:true, textColor?:'blue'|'red'|'green'|'yellow'|'orange'|'purple'|'pink'|'gray'|'brown', backgroundColor?:same palette} }" +
118
+ "\n• Link: { type:'link', href:'https://...', content:[text nodes] }" +
119
+ "\n• Section cross-reference: write $[Section Name] as plain text inside a text node — it renders as a clickable link to that section." +
120
+ "\n\nEXAMPLE — a section with heading, paragraph, callout, and table:" +
121
+ '\n[{"type":"heading","props":{"level":2},"content":[{"type":"text","text":"Overview","styles":{}}],"children":[]},{"type":"paragraph","content":[{"type":"text","text":"This section covers "},{"type":"text","text":"core mechanics","styles":{"bold":true}},{"type":"text","text":" of the game.","styles":{}}],"children":[]},{"type":"callout","props":{"emoji":"⚠️","variant":"warning"},"content":[{"type":"text","text":"Balance values are subject to change.","styles":{}}],"children":[]},{"type":"table","content":{"type":"tableContent","rows":[{"cells":[[{"type":"text","text":"Attribute","styles":{"bold":true}}],[{"type":"text","text":"Value","styles":{"bold":true}}]]},{"cells":[[{"type":"text","text":"Speed"}],[{"type":"text","text":"5.0"}]]}]},"children":[]}]';
122
+ server.tool("create_section", "Create a new section in a project. Use `contentBlocks` for rich formatted descriptions (headings, callouts, tables, lists, etc.). Always pair it with a plain-text `content` for search.", {
123
+ projectId: z.string().describe("Project UUID"),
124
+ title: z.string().describe("Section title"),
125
+ content: z.string().optional().describe("Plain-text / markdown version of the description — used for search and as fallback when blocks are unavailable. If omitted and contentBlocks is provided, leave empty."),
126
+ contentBlocks: z.array(z.record(z.unknown())).optional().describe(CONTENT_BLOCKS_DESC),
127
+ parentId: z.string().optional().describe("Parent section UUID for sub-sections"),
128
+ order: z.number().optional().describe("Sort order (0-based)"),
129
+ color: z.string().optional().describe("Hex color (#rrggbb)"),
130
+ domainTags: z.array(z.string()).optional().describe("Game design domain tags (e.g. combat, economy)"),
131
+ dataId: z.string().optional().describe("User-defined data identifier (e.g. FARM_ANIMAL_CHICKEN)"),
132
+ }, async ({ projectId, ...params }) => {
133
+ try {
134
+ return json(await client.createSection(projectId, params));
135
+ }
136
+ catch (e) {
137
+ return err(e);
138
+ }
139
+ });
140
+ server.tool("update_section", "Update a section's fields (title, content, color, tags, etc.). Use `contentBlocks` to replace the description with rich formatted content.", {
141
+ projectId: z.string().describe("Project UUID"),
142
+ sectionId: z.string().describe("Section UUID"),
143
+ title: z.string().optional().describe("New title"),
144
+ content: z.string().optional().describe("Plain-text / markdown version of the description"),
145
+ contentBlocks: z.array(z.record(z.unknown())).optional().describe(CONTENT_BLOCKS_DESC),
146
+ parentId: z.string().optional().describe("New parent section UUID"),
147
+ order: z.number().optional().describe("New sort order"),
148
+ color: z.string().optional().describe("New hex color"),
149
+ domainTags: z.array(z.string()).optional().describe("New domain tags"),
150
+ dataId: z.string().optional().describe("New data identifier"),
151
+ linkedSpreadsheetId: z.string().nullable().optional().describe("UUID of the linked Google Spreadsheet (from project.linkedSpreadsheets)"),
152
+ }, async ({ projectId, sectionId, ...fields }) => {
153
+ try {
154
+ return json(await client.updateSection(projectId, sectionId, fields));
155
+ }
156
+ catch (e) {
157
+ return err(e);
158
+ }
159
+ });
160
+ server.tool("delete_section", "Delete a section and all its sub-sections (irreversible)", {
161
+ projectId: z.string().describe("Project UUID"),
162
+ sectionId: z.string().describe("Section UUID"),
163
+ }, async ({ projectId, sectionId }) => {
164
+ try {
165
+ return json(await client.deleteSection(projectId, sectionId));
166
+ }
167
+ catch (e) {
168
+ return err(e);
169
+ }
170
+ });
171
+ // ── Addons ──────────────────────────────────────────────────────
172
+ server.tool("list_addons", "List all addons of a section (balance tables, currencies, inventory, etc.)", {
173
+ projectId: z.string().describe("Project UUID"),
174
+ sectionId: z.string().describe("Section UUID"),
175
+ }, async ({ projectId, sectionId }) => {
176
+ try {
177
+ return json(await client.listAddons(projectId, sectionId));
178
+ }
179
+ catch (e) {
180
+ return err(e);
181
+ }
182
+ });
183
+ server.tool("create_addon", "Add an addon to a section. Types: xpBalance, progressionTable, economyLink, currency, globalVariable, inventory, production, craftTable, crop, dataSchema, attributeDefinitions, attributeProfile, attributeModifiers, fieldLibrary, exportSchema, richDoc", {
184
+ projectId: z.string().describe("Project UUID"),
185
+ sectionId: z.string().describe("Section UUID"),
186
+ type: z.string().describe("Addon type (e.g. currency, inventory, progressionTable)"),
187
+ name: z.string().describe("Display name for the addon"),
188
+ group: z.string().optional().describe("Optional group name"),
189
+ data: z.record(z.unknown()).optional().describe("Type-specific addon data"),
190
+ }, async ({ projectId, sectionId, ...params }) => {
191
+ try {
192
+ return json(await client.createAddon(projectId, sectionId, params));
193
+ }
194
+ catch (e) {
195
+ return err(e);
196
+ }
197
+ });
198
+ server.tool("update_addon", "Update an addon's name, group, or data", {
199
+ projectId: z.string().describe("Project UUID"),
200
+ sectionId: z.string().describe("Section UUID"),
201
+ addonId: z.string().describe("Addon UUID"),
202
+ name: z.string().optional().describe("New display name"),
203
+ group: z.string().optional().describe("New group name"),
204
+ data: z.record(z.unknown()).optional().describe("Updated addon data (merged with existing)"),
205
+ }, async ({ projectId, sectionId, addonId, ...fields }) => {
206
+ try {
207
+ return json(await client.updateAddon(projectId, sectionId, addonId, fields));
208
+ }
209
+ catch (e) {
210
+ return err(e);
211
+ }
212
+ });
213
+ server.tool("delete_addon", "Remove an addon from a section", {
214
+ projectId: z.string().describe("Project UUID"),
215
+ sectionId: z.string().describe("Section UUID"),
216
+ addonId: z.string().describe("Addon UUID"),
217
+ }, async ({ projectId, sectionId, addonId }) => {
218
+ try {
219
+ return json(await client.deleteAddon(projectId, sectionId, addonId));
220
+ }
221
+ catch (e) {
222
+ return err(e);
223
+ }
224
+ });
225
+ server.tool("copy_addon", "Copy an addon from one section to another. Generates a new addon ID, deep-clones the data, and re-links intra-section refs (production/progression/economyLink bindings, exportSchema addonIds) to the destination's equivalent addons so value bindings keep working when the target page already has the needed addons (cross-section refs are preserved). Singleton addon types (one-per-page: dataSchema, production, economyLink, currency, progressionTable, etc.) already present in the destination cause a 409 unless overwrite=true, which replaces the existing addon in place (keeping its id/group/name). TIP: to copy a RemoteConfig (exportSchema) into a page that lacks the addons it references (e.g. its DataSchema or ProgressionTable), copy those dependency addons FIRST, then copy the RemoteConfig — its bindings will re-link to them in the destination. Returns the inserted (or overwritten) addon.", {
226
+ projectId: z.string().describe("Project UUID"),
227
+ sectionId: z.string().describe("Section UUID where the source addon lives"),
228
+ addonId: z.string().describe("Addon UUID to copy"),
229
+ toSectionId: z.string().describe("Destination section UUID"),
230
+ overwrite: z.boolean().optional().describe("If the destination already has a singleton addon of the same type, replace its values in place instead of failing with 409."),
231
+ }, async ({ projectId, sectionId, addonId, toSectionId, overwrite }) => {
232
+ try {
233
+ return json(await client.copyAddon(projectId, sectionId, addonId, toSectionId, overwrite));
234
+ }
235
+ catch (e) {
236
+ return err(e);
237
+ }
238
+ });
239
+ server.tool("move_addon", "Move an addon from one section to another, keeping its ID. Re-links intra-section refs in the moved addon to the destination's equivalent addons, and when the source section is left without another addon of the same type, rewrites reverse-refs across the project to point at the destination. Singleton addon types already present in the destination cause a 409 unless overwrite=true, which replaces the existing addon in place (keeping its id/group/name). Returns { addon, reverseRefsUpdated }.", {
240
+ projectId: z.string().describe("Project UUID"),
241
+ sectionId: z.string().describe("Section UUID where the source addon lives"),
242
+ addonId: z.string().describe("Addon UUID to move"),
243
+ toSectionId: z.string().describe("Destination section UUID (must differ from origin)"),
244
+ overwrite: z.boolean().optional().describe("If the destination already has a singleton addon of the same type, replace it in place instead of failing with 409."),
245
+ }, async ({ projectId, sectionId, addonId, toSectionId, overwrite }) => {
246
+ try {
247
+ return json(await client.moveAddon(projectId, sectionId, addonId, toSectionId, overwrite));
248
+ }
249
+ catch (e) {
250
+ return err(e);
251
+ }
252
+ });
253
+ // ── Search ──────────────────────────────────────────────────────
254
+ server.tool("search", "Search across all accessible projects and sections by keyword", {
255
+ query: z.string().describe("Search term"),
256
+ type: z.enum(["all", "projects", "sections"]).optional().describe("Filter results by type"),
257
+ limit: z.number().optional().describe("Max results (1–50, default 20)"),
258
+ }, async ({ query, type, limit }) => {
259
+ try {
260
+ return json(await client.search(query, type, limit));
261
+ }
262
+ catch (e) {
263
+ return err(e);
264
+ }
265
+ });
266
+ // ── Remote Config ───────────────────────────────────────────────
267
+ server.tool("get_remote_config", "Resolve Remote Config (exportSchema) addons and return the RESOLVED economy JSON (actual values, not the blueprint). Scope: no sectionId/addonId → every config in the project; sectionId → every config in that section's subtree; addonId → a single config. Use this to get all balancing data in one call.", {
268
+ projectId: z.string().describe("Project UUID"),
269
+ sectionId: z.string().optional().describe("Limit to this section's subtree"),
270
+ addonId: z.string().optional().describe("Resolve a single exportSchema addon by its id"),
271
+ }, async ({ projectId, sectionId, addonId }) => {
272
+ try {
273
+ return json(await client.getRemoteConfig(projectId, { sectionId, addonId }));
274
+ }
275
+ catch (e) {
276
+ return err(e);
277
+ }
278
+ });
279
+ }
280
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC;AAED,SAAS,IAAI,CAAC,IAAa;IACzB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,GAAG,CAAC,CAAU;IACrB,IAAI,CAAC,YAAY,WAAW,EAAE,CAAC;QAC7B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC1G,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EA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AAC;QAC3F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;KACxE,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAC/B,IAAI,CAAC;YAAC,OAAO,IAAI,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;QAAC,CAAC;QAC7D,OAAO,CAAC,EAAE,CAAC;YAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAC9B,CAAC,CACF,CAAC;IAEF,mEAAmE;IAEnE,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,gTAAgT,EAChT;QACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC5E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;KACzF,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC;YAAC,OAAO,IAAI,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QAAC,CAAC;QACrF,OAAO,CAAC,EAAE,CAAC;YAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@doublehitgames/gdd-mcp",
3
+ "version": "0.4.1",
4
+ "description": "MCP server for GDD Manager — lets AI assistants read and write game design documents",
5
+ "type": "module",
6
+ "bin": {
7
+ "gdd-mcp": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "dev": "tsc --watch",
15
+ "start": "node dist/index.js"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "gdd",
20
+ "game-design",
21
+ "claude",
22
+ "ai"
23
+ ],
24
+ "license": "MIT",
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "dependencies": {
29
+ "@modelcontextprotocol/sdk": "^1.12.1"
30
+ }
31
+ }