@better-i18n/mcp-server 0.1.5 → 0.2.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.
Files changed (42) hide show
  1. package/README.md +13 -9
  2. package/dist/base-tool.d.ts +43 -0
  3. package/dist/base-tool.d.ts.map +1 -0
  4. package/dist/base-tool.js +67 -0
  5. package/dist/base-tool.js.map +1 -0
  6. package/dist/helpers.d.ts +30 -0
  7. package/dist/helpers.d.ts.map +1 -0
  8. package/dist/helpers.js +32 -0
  9. package/dist/helpers.js.map +1 -0
  10. package/dist/index.js +12 -51
  11. package/dist/index.js.map +1 -1
  12. package/dist/tools/bulkCreateKeys.d.ts +0 -1
  13. package/dist/tools/bulkCreateKeys.d.ts.map +1 -1
  14. package/dist/tools/bulkCreateKeys.js +28 -79
  15. package/dist/tools/bulkCreateKeys.js.map +1 -1
  16. package/dist/tools/bulkUpdateTranslations.d.ts +0 -1
  17. package/dist/tools/bulkUpdateTranslations.d.ts.map +1 -1
  18. package/dist/tools/bulkUpdateTranslations.js +27 -78
  19. package/dist/tools/bulkUpdateTranslations.js.map +1 -1
  20. package/dist/tools/createTranslationKey.d.ts +0 -1
  21. package/dist/tools/createTranslationKey.d.ts.map +1 -1
  22. package/dist/tools/createTranslationKey.js +25 -76
  23. package/dist/tools/createTranslationKey.js.map +1 -1
  24. package/dist/tools/getProjectInfo.d.ts +0 -1
  25. package/dist/tools/getProjectInfo.d.ts.map +1 -1
  26. package/dist/tools/getProjectInfo.js +11 -62
  27. package/dist/tools/getProjectInfo.js.map +1 -1
  28. package/dist/tools/listKeys.d.ts +0 -1
  29. package/dist/tools/listKeys.d.ts.map +1 -1
  30. package/dist/tools/listKeys.js +17 -67
  31. package/dist/tools/listKeys.js.map +1 -1
  32. package/dist/tools/updateTranslation.d.ts +0 -1
  33. package/dist/tools/updateTranslation.d.ts.map +1 -1
  34. package/dist/tools/updateTranslation.js +26 -77
  35. package/dist/tools/updateTranslation.js.map +1 -1
  36. package/dist/types/index.d.ts +1 -8
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/context.d.ts +0 -23
  40. package/dist/context.d.ts.map +0 -1
  41. package/dist/context.js +0 -154
  42. package/dist/context.js.map +0 -1
@@ -2,11 +2,10 @@
2
2
  * bulkUpdateTranslations MCP Tool
3
3
  *
4
4
  * Updates translations for multiple keys in a single request.
5
- * Perfect for batch updating translations across multiple languages.
6
5
  */
7
- import { z } from 'zod';
8
- const inputSchema = z.object({
9
- projectSlug: z.string().optional(),
6
+ import { z } from "zod";
7
+ import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
8
+ const inputSchema = projectSchema.extend({
10
9
  updates: z.array(z.object({
11
10
  key: z.string(),
12
11
  namespace: z.string().optional(),
@@ -16,14 +15,11 @@ const inputSchema = z.object({
16
15
  export const bulkUpdateTranslations = {
17
16
  definition: {
18
17
  name: "bulkUpdateTranslations",
19
- description: "Update translations for multiple keys in a SINGLE efficient request. ALWAYS use this instead of calling updateTranslation multiple times. Use this when updating 2 or more translations. This is much faster and more efficient than individual updates. Each update specifies the key and translations for target languages. IMPORTANT: If namespace is provided, the key should NOT include the namespace prefix (e.g., namespace: 'nav', key: 'home' NOT 'nav.home').",
18
+ description: "Update translations for multiple keys in a SINGLE efficient request. ALWAYS use this instead of calling updateTranslation multiple times when updating 2 or more translations.",
20
19
  inputSchema: {
21
20
  type: "object",
22
21
  properties: {
23
- projectSlug: {
24
- type: "string",
25
- description: "Project slug (optional if i18n.config.ts exists)",
26
- },
22
+ ...projectInputProperty,
27
23
  updates: {
28
24
  type: "array",
29
25
  description: "Array of translation updates",
@@ -32,88 +28,41 @@ export const bulkUpdateTranslations = {
32
28
  properties: {
33
29
  key: {
34
30
  type: "string",
35
- description: "Translation key WITHOUT namespace prefix when namespace is provided (e.g., 'home' when namespace is 'nav', NOT 'nav.home'). Only include full path if namespace is not provided.",
31
+ description: "Translation key WITHOUT namespace prefix when namespace is provided.",
36
32
  },
37
33
  namespace: {
38
34
  type: "string",
39
- description: "Namespace for the key (e.g., 'nav', 'home', 'cta'). When provided, the key should NOT include this namespace prefix. Defaults to 'default' if not provided.",
35
+ description: "Namespace for the key. Defaults to 'default'.",
40
36
  },
41
37
  translations: {
42
38
  type: "object",
43
- description: "Translations for target languages. Keys are language codes (tr, de, fr), values are translated text",
39
+ description: "Translations for target languages. Keys are language codes, values are translated text.",
44
40
  },
45
41
  },
46
42
  required: ["key", "translations"],
47
43
  },
48
44
  },
49
45
  },
50
- required: ["updates"],
46
+ required: ["project", "updates"],
51
47
  },
52
48
  },
53
- async execute(client, args, context) {
54
- const input = inputSchema.parse(args);
55
- // Parse projectSlug - supports both "org/project" format and standalone "project"
56
- let orgSlug;
57
- let projectSlug;
58
- if (input.projectSlug?.includes("/")) {
59
- // AI sent "org/project" format - parse it
60
- const parts = input.projectSlug.split("/");
61
- orgSlug = parts[0];
62
- projectSlug = parts[1];
63
- }
64
- else {
65
- // Fall back to auto-detected context or explicit projectSlug
66
- projectSlug = input.projectSlug || context.projectContext?.projectSlug;
67
- orgSlug = context.projectContext?.workspaceId;
68
- }
69
- if (!projectSlug || !orgSlug) {
70
- return {
71
- content: [
72
- {
73
- type: "text",
74
- text: "Error: Project not specified. Use format 'org/project' (e.g., 'aliosman-co/personal')",
75
- },
76
- ],
77
- isError: true,
78
- };
79
- }
80
- try {
81
- // Format updates with default namespace
82
- const formattedUpdates = input.updates.map((u) => ({
83
- key: u.key,
84
- namespace: u.namespace || "default",
85
- translations: u.translations,
86
- }));
87
- const result = await client.mcp.bulkUpdateTranslations.mutate({
88
- orgSlug,
89
- projectSlug,
90
- updates: formattedUpdates,
91
- });
92
- return {
93
- content: [
94
- {
95
- type: "text",
96
- text: JSON.stringify({
97
- success: true,
98
- project: `${orgSlug}/${projectSlug}`,
99
- keysUpdated: result.keysUpdated,
100
- updates: result.updates,
101
- }, null, 2),
102
- },
103
- ],
104
- };
105
- }
106
- catch (error) {
107
- return {
108
- content: [
109
- {
110
- type: "text",
111
- text: `Error updating translations: ${error instanceof Error ? error.message : String(error)}`,
112
- },
113
- ],
114
- isError: true,
115
- };
116
- }
117
- },
49
+ execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
50
+ const formattedUpdates = input.updates.map((u) => ({
51
+ key: u.key,
52
+ namespace: u.namespace || "default",
53
+ translations: u.translations,
54
+ }));
55
+ const result = await client.mcp.bulkUpdateTranslations.mutate({
56
+ orgSlug: workspaceId,
57
+ projectSlug,
58
+ updates: formattedUpdates,
59
+ });
60
+ return success({
61
+ success: true,
62
+ project: input.project,
63
+ keysUpdated: result.keysUpdated,
64
+ updates: result.updates,
65
+ });
66
+ }),
118
67
  };
119
68
  //# sourceMappingURL=bulkUpdateTranslations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bulkUpdateTranslations.js","sourceRoot":"","sources":["../../src/tools/bulkUpdateTranslations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KAC/C,CAAC,CACH;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,UAAU,EAAE;QACV,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,0cAA0c;QAC5c,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU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
1
+ {"version":3,"file":"bulkUpdateTranslations.js","sourceRoot":"","sources":["../../src/tools/bulkUpdateTranslations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,OAAO,GACR,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KAC/C,CAAC,CACH;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,UAAU,EAAE;QACV,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,gLAAgL;QAClL,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,oBAAoB;gBACvB,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,8BAA8B;oBAC3C,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,GAAG,EAAE;gCACH,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,sEAAsE;6BACpF;4BACD,SAAS,EAAE;gCACT,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+CAA+C;6BAC7D;4BACD,YAAY,EAAE;gCACZ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,yFAAyF;6BACvG;yBACF;wBACD,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC;qBAClC;iBACF;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SACjC;KACF;IAED,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;QAC3E,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjD,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,YAAY,EAAE,CAAC,CAAC,YAAY;SAC7B,CAAC,CAAC,CAAC;QAEJ,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC;YAC5D,OAAO,EAAE,WAAW;YACpB,WAAW;YACX,OAAO,EAAE,gBAAgB;SAC1B,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;YACb,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC;IACL,CAAC,CAAC;CACL,CAAC"}
@@ -2,7 +2,6 @@
2
2
  * createTranslationKey MCP Tool
3
3
  *
4
4
  * Creates a new translation key with source text in the default language.
5
- * Uses the MCP-specific API that works with org/project slugs.
6
5
  */
7
6
  import type { Tool } from "../types/index.js";
8
7
  export declare const createTranslationKey: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"createTranslationKey.d.ts","sourceRoot":"","sources":["../../src/tools/createTranslationKey.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAS9C,eAAO,MAAM,oBAAoB,EAAE,IAsGlC,CAAC"}
1
+ {"version":3,"file":"createTranslationKey.d.ts","sourceRoot":"","sources":["../../src/tools/createTranslationKey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAQ9C,eAAO,MAAM,oBAAoB,EAAE,IA6ClC,CAAC"}
@@ -2,11 +2,10 @@
2
2
  * createTranslationKey MCP Tool
3
3
  *
4
4
  * Creates a new translation key with source text in the default language.
5
- * Uses the MCP-specific API that works with org/project slugs.
6
5
  */
7
- import { z } from 'zod';
8
- const inputSchema = z.object({
9
- projectSlug: z.string().optional(),
6
+ import { z } from "zod";
7
+ import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
8
+ const inputSchema = projectSchema.extend({
10
9
  key: z.string().min(1),
11
10
  sourceValue: z.string().min(1),
12
11
  namespace: z.string().optional(),
@@ -14,17 +13,14 @@ const inputSchema = z.object({
14
13
  export const createTranslationKey = {
15
14
  definition: {
16
15
  name: "createTranslationKey",
17
- description: "Create a SINGLE translation key with source text. IMPORTANT: If you need to create 2 or more keys, use bulkCreateKeys instead - it's much more efficient. Only use this tool when creating exactly ONE key. If namespace is provided, the key should NOT include the namespace prefix (e.g., namespace: 'auth', key: 'login.title' NOT 'auth.login.title'). If namespace is not provided, it will be auto-extracted from the key if it contains dots. If projectSlug is not provided, uses the project from i18n.config.ts in the workspace.",
16
+ description: "Create a SINGLE translation key with source text. IMPORTANT: If you need to create 2 or more keys, use bulkCreateKeys instead.",
18
17
  inputSchema: {
19
18
  type: "object",
20
19
  properties: {
21
- projectSlug: {
22
- type: "string",
23
- description: "Project slug (optional if i18n.config.ts exists)",
24
- },
20
+ ...projectInputProperty,
25
21
  key: {
26
22
  type: "string",
27
- description: "Translation key WITHOUT namespace prefix when namespace is provided (e.g., 'login.title' when namespace is 'auth'). Include namespace in key only if namespace parameter is not provided (e.g., 'auth.login.title').",
23
+ description: "Translation key WITHOUT namespace prefix when namespace is provided.",
28
24
  },
29
25
  sourceValue: {
30
26
  type: "string",
@@ -32,75 +28,28 @@ export const createTranslationKey = {
32
28
  },
33
29
  namespace: {
34
30
  type: "string",
35
- description: "Namespace for the key (e.g., 'auth', 'home', 'cta'). When provided, the key should NOT include this namespace prefix.",
31
+ description: "Namespace for the key. Defaults to 'default'.",
36
32
  },
37
33
  },
38
- required: ["key", "sourceValue"],
34
+ required: ["project", "key", "sourceValue"],
39
35
  },
40
36
  },
41
- async execute(client, args, context) {
42
- const input = inputSchema.parse(args);
43
- // Parse projectSlug - supports both "org/project" format and standalone "project"
44
- let orgSlug;
45
- let projectSlug;
46
- if (input.projectSlug?.includes("/")) {
47
- // AI sent "org/project" format - parse it
48
- const parts = input.projectSlug.split("/");
49
- orgSlug = parts[0];
50
- projectSlug = parts[1];
51
- }
52
- else {
53
- // Fall back to auto-detected context or explicit projectSlug
54
- projectSlug = input.projectSlug || context.projectContext?.projectSlug;
55
- orgSlug = context.projectContext?.workspaceId;
56
- }
57
- if (!projectSlug || !orgSlug) {
58
- return {
59
- content: [
60
- {
61
- type: "text",
62
- text: "Error: Project not specified. Use format 'org/project' (e.g., 'aliosman-co/personal')",
63
- },
64
- ],
65
- isError: true,
66
- };
67
- }
68
- try {
69
- // Use MCP-specific endpoint with slug-based lookup
70
- const result = await client.mcp.createKey.mutate({
71
- orgSlug,
72
- projectSlug,
73
- key: input.key,
74
- namespace: input.namespace || "default",
75
- sourceText: input.sourceValue,
76
- });
77
- return {
78
- content: [
79
- {
80
- type: "text",
81
- text: JSON.stringify({
82
- success: true,
83
- keyId: result.keyId,
84
- key: input.key,
85
- namespace: input.namespace || "default",
86
- sourceText: input.sourceValue,
87
- project: `${orgSlug}/${projectSlug}`,
88
- }, null, 2),
89
- },
90
- ],
91
- };
92
- }
93
- catch (error) {
94
- return {
95
- content: [
96
- {
97
- type: "text",
98
- text: `Error creating translation key: ${error instanceof Error ? error.message : String(error)}`,
99
- },
100
- ],
101
- isError: true,
102
- };
103
- }
104
- },
37
+ execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
38
+ const result = await client.mcp.createKey.mutate({
39
+ orgSlug: workspaceId,
40
+ projectSlug,
41
+ key: input.key,
42
+ namespace: input.namespace || "default",
43
+ sourceText: input.sourceValue,
44
+ });
45
+ return success({
46
+ success: true,
47
+ keyId: result.keyId,
48
+ key: input.key,
49
+ namespace: input.namespace || "default",
50
+ sourceText: input.sourceValue,
51
+ project: input.project,
52
+ });
53
+ }),
105
54
  };
106
55
  //# sourceMappingURL=createTranslationKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTranslationKey.js","sourceRoot":"","sources":["../../src/tools/createTranslationKey.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,UAAU,EAAE;QACV,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EACT,8gBAA8gB;QAChhB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kDAAkD;iBAChE;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sNAAsN;iBACzN;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mDAAmD;iBACjE;gBACD,SAAS,EAAE;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AC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;4BACE,OAAO,EAAE,IAAI;4BACb,KAAK,EAAE,MAAM,CAAC,KAAK;4BACnB,GAAG,EAAE,KAAK,CAAC,GAAG;4BACd,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,SAAS;4BACvC,UAAU,EAAE,KAAK,CAAC,WAAW;4BAC7B,OAAO,EAAE,GAAG,OAAO,IAAI,WAAW,EAAE;yBACrC,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mCAAmC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAClG;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"createTranslationKey.js","sourceRoot":"","sources":["../../src/tools/createTranslationKey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,OAAO,GACR,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC;IACvC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH,MAA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
3
3
  *
4
4
  * Gets project information including available namespaces, languages, and stats.
5
- * Useful for understanding the project structure before adding translations.
6
5
  */
7
6
  import type { Tool } from "../types/index.js";
8
7
  export declare const getProjectInfo: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"getProjectInfo.d.ts","sourceRoot":"","sources":["../../src/tools/getProjectInfo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAM9C,eAAO,MAAM,cAAc,EAAE,IAwE5B,CAAC"}
1
+ {"version":3,"file":"getProjectInfo.d.ts","sourceRoot":"","sources":["../../src/tools/getProjectInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAI9C,eAAO,MAAM,cAAc,EAAE,IAsB5B,CAAC"}
@@ -2,12 +2,9 @@
2
2
  * getProjectInfo MCP Tool
3
3
  *
4
4
  * Gets project information including available namespaces, languages, and stats.
5
- * Useful for understanding the project structure before adding translations.
6
5
  */
7
- import { z } from 'zod';
8
- const inputSchema = z.object({
9
- projectSlug: z.string().optional(),
10
- });
6
+ import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
7
+ const inputSchema = projectSchema;
11
8
  export const getProjectInfo = {
12
9
  definition: {
13
10
  name: "getProjectInfo",
@@ -15,65 +12,17 @@ export const getProjectInfo = {
15
12
  inputSchema: {
16
13
  type: "object",
17
14
  properties: {
18
- projectSlug: {
19
- type: "string",
20
- description: "Project slug (optional if i18n.config.ts exists)",
21
- },
15
+ ...projectInputProperty,
22
16
  },
17
+ required: ["project"],
23
18
  },
24
19
  },
25
- async execute(client, args, context) {
26
- const input = inputSchema.parse(args);
27
- // Parse projectSlug - supports both "org/project" format and standalone "project"
28
- let orgSlug;
29
- let projectSlug;
30
- if (input.projectSlug?.includes("/")) {
31
- // AI sent "org/project" format - parse it
32
- const parts = input.projectSlug.split("/");
33
- orgSlug = parts[0];
34
- projectSlug = parts[1];
35
- }
36
- else {
37
- // Fall back to auto-detected context or explicit projectSlug
38
- projectSlug = input.projectSlug || context.projectContext?.projectSlug;
39
- orgSlug = context.projectContext?.workspaceId;
40
- }
41
- if (!projectSlug || !orgSlug) {
42
- return {
43
- content: [
44
- {
45
- type: "text",
46
- text: "Error: Project not specified. Use format 'org/project' (e.g., 'aliosman-co/personal')",
47
- },
48
- ],
49
- isError: true,
50
- };
51
- }
52
- try {
53
- const result = await client.mcp.getProjectInfo.query({
54
- orgSlug,
55
- projectSlug,
56
- });
57
- return {
58
- content: [
59
- {
60
- type: "text",
61
- text: JSON.stringify(result, null, 2),
62
- },
63
- ],
64
- };
65
- }
66
- catch (error) {
67
- return {
68
- content: [
69
- {
70
- type: "text",
71
- text: `Error getting project info: ${error instanceof Error ? error.message : String(error)}`,
72
- },
73
- ],
74
- isError: true,
75
- };
76
- }
77
- },
20
+ execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
21
+ const result = await client.mcp.getProjectInfo.query({
22
+ orgSlug: workspaceId,
23
+ projectSlug,
24
+ });
25
+ return success(result);
26
+ }),
78
27
  };
79
28
  //# sourceMappingURL=getProjectInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getProjectInfo.js","sourceRoot":"","sources":["../../src/tools/getProjectInfo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,wKAAwK;QAC1K,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;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AC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC9F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"getProjectInfo.js","sourceRoot":"","sources":["../../src/tools/getProjectInfo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,OAAO,GACR,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,wKAAwK;QAC1K,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,oBAAoB;aACxB;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IAED,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;QAC3E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC;YACnD,OAAO,EAAE,WAAW;YACpB,WAAW;SACZ,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC;CACL,CAAC"}
@@ -2,7 +2,6 @@
2
2
  * listKeys MCP Tool
3
3
  *
4
4
  * Lists ALL translation keys in a project with their source text and translations.
5
- * Uses the MCP-specific getAllTranslations endpoint - no pagination needed.
6
5
  */
7
6
  import type { Tool } from "../types/index.js";
8
7
  export declare const listKeys: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"listKeys.d.ts","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAQ9C,eAAO,MAAM,QAAQ,EAAE,IAsFtB,CAAC"}
1
+ {"version":3,"file":"listKeys.d.ts","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAO9C,eAAO,MAAM,QAAQ,EAAE,IAiCtB,CAAC"}
@@ -2,92 +2,42 @@
2
2
  * listKeys MCP Tool
3
3
  *
4
4
  * Lists ALL translation keys in a project with their source text and translations.
5
- * Uses the MCP-specific getAllTranslations endpoint - no pagination needed.
6
5
  */
7
- import { z } from 'zod';
8
- const inputSchema = z.object({
9
- projectSlug: z.string().optional(),
6
+ import { z } from "zod";
7
+ import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
8
+ const inputSchema = projectSchema.extend({
10
9
  search: z.string().optional(),
11
10
  namespaces: z.array(z.string()).optional(),
12
11
  });
13
12
  export const listKeys = {
14
13
  definition: {
15
14
  name: "listKeys",
16
- description: "Get all translation keys with their source text and translations. Returns ALL keys in a single response - no pagination. Use 'namespaces' to filter by namespace or 'search' to search within key names and source text.",
15
+ description: "Get all translation keys with their source text and translations. Returns ALL keys in a single response. Use 'namespaces' to filter by namespace or 'search' to search within key names and source text.",
17
16
  inputSchema: {
18
17
  type: "object",
19
18
  properties: {
20
- projectSlug: {
21
- type: "string",
22
- description: "Project slug (optional if i18n.config.ts exists)",
23
- },
19
+ ...projectInputProperty,
24
20
  search: {
25
21
  type: "string",
26
- description: "Search term to find in key names or source text (e.g., 'login' to find keys containing 'login' or source text containing 'login'). This is a fuzzy search across both key names and content.",
22
+ description: "Search term to find in key names or source text.",
27
23
  },
28
24
  namespaces: {
29
25
  type: "array",
30
26
  items: { type: "string" },
31
- description: "Filter by specific namespaces (e.g., ['nav', 'home']). Use this when you want keys from specific namespaces only, not for searching within keys.",
27
+ description: "Filter by specific namespaces (e.g., ['nav', 'home']).",
32
28
  },
33
29
  },
30
+ required: ["project"],
34
31
  },
35
32
  },
36
- async execute(client, args, context) {
37
- const input = inputSchema.parse(args);
38
- // Parse projectSlug - supports both "org/project" format and standalone "project"
39
- let orgSlug;
40
- let projectSlug;
41
- if (input.projectSlug?.includes("/")) {
42
- // AI sent "org/project" format - parse it
43
- const parts = input.projectSlug.split("/");
44
- orgSlug = parts[0];
45
- projectSlug = parts[1];
46
- }
47
- else {
48
- // Fall back to auto-detected context or explicit projectSlug
49
- projectSlug = input.projectSlug || context.projectContext?.projectSlug;
50
- orgSlug = context.projectContext?.workspaceId;
51
- }
52
- if (!projectSlug || !orgSlug) {
53
- return {
54
- content: [
55
- {
56
- type: "text",
57
- text: "Error: Project not specified. Use format 'org/project' (e.g., 'aliosman-co/personal')",
58
- },
59
- ],
60
- isError: true,
61
- };
62
- }
63
- try {
64
- // Use getAllTranslations endpoint - no pagination, single request
65
- const result = await client.mcp.getAllTranslations.query({
66
- orgSlug,
67
- projectSlug,
68
- search: input.search,
69
- namespaces: input.namespaces,
70
- });
71
- return {
72
- content: [
73
- {
74
- type: "text",
75
- text: JSON.stringify(result, null, 2),
76
- },
77
- ],
78
- };
79
- }
80
- catch (error) {
81
- return {
82
- content: [
83
- {
84
- type: "text",
85
- text: `Error listing keys: ${error instanceof Error ? error.message : String(error)}`,
86
- },
87
- ],
88
- isError: true,
89
- };
90
- }
91
- },
33
+ execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
34
+ const result = await client.mcp.getAllTranslations.query({
35
+ orgSlug: workspaceId,
36
+ projectSlug,
37
+ search: input.search,
38
+ namespaces: input.namespaces,
39
+ });
40
+ return success(result);
41
+ }),
92
42
  };
93
43
  //# sourceMappingURL=listKeys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listKeys.js","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAS;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,0NAA0N;QAC5N,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kDAAkD;iBAChE;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8LAA8L;iBACjM;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,kJAAkJ;iBACrJ;aACF;SACF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO;QACjC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEtC,kFAAkF;QAClF,IAAI,OAA2B,CAAC;QAChC,IAAI,WAA+B,CAAC;QAEpC,IAAI,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACrC,0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,CAAC,MAAM;YACpB,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC;CACL,CAAC"}
@@ -2,7 +2,6 @@
2
2
  * updateTranslation MCP Tool
3
3
  *
4
4
  * Updates or creates a translation for a specific language.
5
- * Uses the MCP-specific API that works with org/project slugs.
6
5
  */
7
6
  import type { Tool } from "../types/index.js";
8
7
  export declare const updateTranslation: Tool;
@@ -1 +1 @@
1
- {"version":3,"file":"updateTranslation.d.ts","sourceRoot":"","sources":["../../src/tools/updateTranslation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAU9C,eAAO,MAAM,iBAAiB,EAAE,IA2G/B,CAAC"}
1
+ {"version":3,"file":"updateTranslation.d.ts","sourceRoot":"","sources":["../../src/tools/updateTranslation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAS9C,eAAO,MAAM,iBAAiB,EAAE,IAkD/B,CAAC"}