@better-i18n/mcp 0.11.0 → 0.12.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/dist/server.d.ts.map +1 -1
- package/dist/server.js +5 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/getTranslations.d.ts +28 -0
- package/dist/tools/getTranslations.d.ts.map +1 -0
- package/dist/tools/getTranslations.js +113 -0
- package/dist/tools/getTranslations.js.map +1 -0
- package/dist/tools/listKeys.d.ts +23 -7
- package/dist/tools/listKeys.d.ts.map +1 -1
- package/dist/tools/listKeys.js +62 -43
- package/dist/tools/listKeys.js.map +1 -1
- package/package.json +3 -4
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAerD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG;IAC9D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAaA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,GACnD,MAAM,CAwGR;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -15,6 +15,7 @@ import { getPendingChanges } from "./tools/getPendingChanges.js";
|
|
|
15
15
|
import { getProject } from "./tools/getProject.js";
|
|
16
16
|
import { getSync } from "./tools/getSync.js";
|
|
17
17
|
import { getSyncs } from "./tools/getSyncs.js";
|
|
18
|
+
import { getTranslations } from "./tools/getTranslations.js";
|
|
18
19
|
import { listKeys } from "./tools/listKeys.js";
|
|
19
20
|
import { listProjects } from "./tools/listProjects.js";
|
|
20
21
|
import { publishTranslations } from "./tools/publishTranslations.js";
|
|
@@ -61,6 +62,7 @@ export function createConfiguredServer(apiClient) {
|
|
|
61
62
|
annotate(getProject.definition, readOnly),
|
|
62
63
|
annotate(addLanguage.definition, write),
|
|
63
64
|
annotate(listKeys.definition, readOnly),
|
|
65
|
+
annotate(getTranslations.definition, readOnly),
|
|
64
66
|
annotate(createKeys.definition, write),
|
|
65
67
|
annotate(updateKeys.definition, write),
|
|
66
68
|
annotate(deleteKeys.definition, destructive),
|
|
@@ -88,6 +90,9 @@ export function createConfiguredServer(apiClient) {
|
|
|
88
90
|
case "listKeys":
|
|
89
91
|
result = await listKeys.execute(apiClient, args);
|
|
90
92
|
break;
|
|
93
|
+
case "getTranslations":
|
|
94
|
+
result = await getTranslations.execute(apiClient, args);
|
|
95
|
+
break;
|
|
91
96
|
case "createKeys":
|
|
92
97
|
result = await createKeys.execute(apiClient, args);
|
|
93
98
|
break;
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AA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Y;oBACf,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBACnD,MAAM;gBACR,KAAK,UAAU;oBACb,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBACjD,MAAM;gBACR,KAAK,mBAAmB;oBACtB,MAAM,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBAC1D,MAAM;gBACR,KAAK,qBAAqB;oBACxB,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBAC5D,MAAM;gBACR,KAAK,SAAS;oBACZ,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBAChD,MAAM;gBACR;oBACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;YAC7C,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mBAAmB,IAAI,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC3F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* getTranslations MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets translation keys with full text content and status.
|
|
5
|
+
* Optimized for AI translation tasks that need to read or update translation text.
|
|
6
|
+
*
|
|
7
|
+
* USE THIS when you need actual translation text (to translate, review, or update).
|
|
8
|
+
* Use listKeys instead for browsing/exploring keys — it's faster and uses fewer tokens.
|
|
9
|
+
*
|
|
10
|
+
* SEARCH + FILTER:
|
|
11
|
+
* - search: Text to search for (in source text or specified languages)
|
|
12
|
+
* - languages: Which languages to search in AND return translations for
|
|
13
|
+
* - status: Filter by translation status ("missing", "draft", "approved", "all")
|
|
14
|
+
* - namespaces: Filter by namespace(s)
|
|
15
|
+
* - keys: Fetch specific keys by exact name
|
|
16
|
+
* - limit: Max keys to return (default: 100, safety cap: 200)
|
|
17
|
+
*
|
|
18
|
+
* EXAMPLES:
|
|
19
|
+
* - Find "login" in source: { project: "org/project", search: "login" }
|
|
20
|
+
* - Multi-term search: { project: "org/project", search: ["login", "signup", "forgot_password"] }
|
|
21
|
+
* - Find "Giriş" in Turkish: { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
22
|
+
* - Get all Turkish translations: { project: "org/project", languages: ["tr"] }
|
|
23
|
+
* - Get missing Turkish: { project: "org/project", languages: ["tr"], status: "missing" }
|
|
24
|
+
* - Get specific keys: { project: "org/project", keys: ["auth.login.title", "auth.login.button"] }
|
|
25
|
+
*/
|
|
26
|
+
import type { Tool } from "../types/index.js";
|
|
27
|
+
export declare const getTranslations: Tool;
|
|
28
|
+
//# sourceMappingURL=getTranslations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTranslations.d.ts","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAW9C,eAAO,MAAM,eAAe,EAAE,IAsF7B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* getTranslations MCP Tool
|
|
3
|
+
*
|
|
4
|
+
* Gets translation keys with full text content and status.
|
|
5
|
+
* Optimized for AI translation tasks that need to read or update translation text.
|
|
6
|
+
*
|
|
7
|
+
* USE THIS when you need actual translation text (to translate, review, or update).
|
|
8
|
+
* Use listKeys instead for browsing/exploring keys — it's faster and uses fewer tokens.
|
|
9
|
+
*
|
|
10
|
+
* SEARCH + FILTER:
|
|
11
|
+
* - search: Text to search for (in source text or specified languages)
|
|
12
|
+
* - languages: Which languages to search in AND return translations for
|
|
13
|
+
* - status: Filter by translation status ("missing", "draft", "approved", "all")
|
|
14
|
+
* - namespaces: Filter by namespace(s)
|
|
15
|
+
* - keys: Fetch specific keys by exact name
|
|
16
|
+
* - limit: Max keys to return (default: 100, safety cap: 200)
|
|
17
|
+
*
|
|
18
|
+
* EXAMPLES:
|
|
19
|
+
* - Find "login" in source: { project: "org/project", search: "login" }
|
|
20
|
+
* - Multi-term search: { project: "org/project", search: ["login", "signup", "forgot_password"] }
|
|
21
|
+
* - Find "Giriş" in Turkish: { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
22
|
+
* - Get all Turkish translations: { project: "org/project", languages: ["tr"] }
|
|
23
|
+
* - Get missing Turkish: { project: "org/project", languages: ["tr"], status: "missing" }
|
|
24
|
+
* - Get specific keys: { project: "org/project", keys: ["auth.login.title", "auth.login.button"] }
|
|
25
|
+
*/
|
|
26
|
+
import { z } from "zod";
|
|
27
|
+
import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
|
|
28
|
+
const inputSchema = projectSchema.extend({
|
|
29
|
+
search: z.union([z.string(), z.array(z.string())]).optional(),
|
|
30
|
+
languages: z.array(z.string()).optional(),
|
|
31
|
+
namespaces: z.array(z.string()).optional(),
|
|
32
|
+
keys: z.array(z.string()).optional(),
|
|
33
|
+
status: z.enum(["missing", "draft", "approved", "all"]).optional(),
|
|
34
|
+
limit: z.number().min(0).max(10000).optional(),
|
|
35
|
+
});
|
|
36
|
+
export const getTranslations = {
|
|
37
|
+
definition: {
|
|
38
|
+
name: "getTranslations",
|
|
39
|
+
description: `Get translation keys with full text content and status for AI translation tasks.
|
|
40
|
+
|
|
41
|
+
USE THIS when you need actual translation text (to translate, review, or update).
|
|
42
|
+
Use listKeys instead for browsing/exploring keys — it's faster and uses fewer tokens.
|
|
43
|
+
|
|
44
|
+
SEARCH + FILTER:
|
|
45
|
+
- search: Text to search for (in source text or specified languages)
|
|
46
|
+
- languages: Languages to search in AND return translations for
|
|
47
|
+
- status: Filter by translation status ("missing", "draft", "approved", "all")
|
|
48
|
+
|
|
49
|
+
FILTER OPTIONS:
|
|
50
|
+
- namespaces: Filter by namespace(s)
|
|
51
|
+
- keys: Fetch specific keys by exact name
|
|
52
|
+
- limit: Max keys to return (default: 100, safety cap: 200)
|
|
53
|
+
|
|
54
|
+
EXAMPLES:
|
|
55
|
+
- Find "login" in source: { search: "login" }
|
|
56
|
+
- Multi-term search: { search: ["login", "signup", "forgot_password"] }
|
|
57
|
+
- Find "Giriş" in Turkish: { search: "Giriş", languages: ["tr"] }
|
|
58
|
+
- Get all Turkish translations: { languages: ["tr"] }
|
|
59
|
+
- Get missing Turkish translations: { languages: ["tr"], status: "missing" }
|
|
60
|
+
- Get specific keys: { keys: ["auth.login.title", "auth.login.button"] }
|
|
61
|
+
|
|
62
|
+
Response includes namespaceDetails: a map of namespace metadata (name, keyCount, description, context with team/domain/aiPrompt/tags) for all namespaces present in the result.`,
|
|
63
|
+
inputSchema: {
|
|
64
|
+
type: "object",
|
|
65
|
+
properties: {
|
|
66
|
+
...projectInputProperty,
|
|
67
|
+
search: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "Text to search for in source text or translations (case-insensitive). Single string or array of strings for multi-term search (OR matching). If languages is specified, searches in those languages; otherwise searches source text.",
|
|
70
|
+
},
|
|
71
|
+
languages: {
|
|
72
|
+
type: "array",
|
|
73
|
+
items: { type: "string" },
|
|
74
|
+
description: "Language codes to search in and return (e.g., ['tr', 'de']). If omitted with search, searches source text. If omitted without search, returns all languages.",
|
|
75
|
+
},
|
|
76
|
+
namespaces: {
|
|
77
|
+
type: "array",
|
|
78
|
+
items: { type: "string" },
|
|
79
|
+
description: "Filter by namespace(s)",
|
|
80
|
+
},
|
|
81
|
+
keys: {
|
|
82
|
+
type: "array",
|
|
83
|
+
items: { type: "string" },
|
|
84
|
+
description: "Fetch specific keys by exact name",
|
|
85
|
+
},
|
|
86
|
+
status: {
|
|
87
|
+
type: "string",
|
|
88
|
+
enum: ["missing", "draft", "approved", "all"],
|
|
89
|
+
description: "Filter by translation status (default: all). Requires languages to be specified for filtering.",
|
|
90
|
+
},
|
|
91
|
+
limit: {
|
|
92
|
+
type: "number",
|
|
93
|
+
description: "Maximum number of keys to return (default: 100, safety cap: 200). Set to 0 for all (capped at 200).",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
required: ["project"],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
|
|
100
|
+
const result = await client.mcp.getAllTranslations.query({
|
|
101
|
+
orgSlug: workspaceId,
|
|
102
|
+
projectSlug,
|
|
103
|
+
search: input.search,
|
|
104
|
+
languages: input.languages,
|
|
105
|
+
namespaces: input.namespaces,
|
|
106
|
+
keys: input.keys,
|
|
107
|
+
status: input.status,
|
|
108
|
+
limit: input.limit,
|
|
109
|
+
});
|
|
110
|
+
return success(result);
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=getTranslations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTranslations.js","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,MAA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tC;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,mCAAmC;iBACjD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC;oBAC7C,WAAW,EACT,gGAAgG;iBACnG;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qGAAqG;iBACxG;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IAED,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxB,WAAW,CACT,IAAI,EACJ,WAAW,EACX,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC;YACvD,OAAO,EAAE,WAAW;YACpB,WAAW;YACX,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CACF;CACJ,CAAC"}
|
package/dist/tools/listKeys.d.ts
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* listKeys MCP Tool
|
|
3
3
|
*
|
|
4
|
-
* Lists
|
|
5
|
-
*
|
|
4
|
+
* Lists translation keys in compact format — optimized for browsing and exploration.
|
|
5
|
+
* Returns paginated results with namespace deduplication to minimize token usage.
|
|
6
|
+
*
|
|
7
|
+
* USE THIS for:
|
|
8
|
+
* - Browsing keys (finding what exists)
|
|
9
|
+
* - Checking which keys are missing a translation
|
|
10
|
+
* - Getting key IDs for use with updateKeys
|
|
11
|
+
*
|
|
12
|
+
* Use getTranslations instead when you need actual translation text.
|
|
13
|
+
*
|
|
14
|
+
* RESPONSE FORMAT:
|
|
15
|
+
* - tot: total matching keys (before pagination)
|
|
16
|
+
* - ret: keys returned in this page
|
|
17
|
+
* - has_more: true → increment page to fetch next batch
|
|
18
|
+
* - nss: namespace lookup table — each key's ns field is an index into this array
|
|
19
|
+
* - k: key items (k=name, ns=namespace index, id=uuid, src=source text, tl=translated langs)
|
|
20
|
+
* - note: optional warning (e.g., large project hint to use filters)
|
|
6
21
|
*
|
|
7
22
|
* EXAMPLES:
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* - Find
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
23
|
+
* - List first page: { project: "org/project" }
|
|
24
|
+
* - Find "login" keys: { project: "org/project", search: "login" }
|
|
25
|
+
* - Find keys missing Turkish: { project: "org/project", missingLanguage: "tr" }
|
|
26
|
+
* - Filter by namespace: { project: "org/project", namespaces: ["auth", "common"] }
|
|
27
|
+
* - Next page: { project: "org/project", page: 2 }
|
|
28
|
+
* - Larger page: { project: "org/project", limit: 50 }
|
|
13
29
|
*/
|
|
14
30
|
import type { Tool } from "../types/index.js";
|
|
15
31
|
export declare const listKeys: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listKeys.d.ts","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"listKeys.d.ts","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAU9C,eAAO,MAAM,QAAQ,EAAE,IA8EtB,CAAC"}
|
package/dist/tools/listKeys.js
CHANGED
|
@@ -1,89 +1,108 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* listKeys MCP Tool
|
|
3
3
|
*
|
|
4
|
-
* Lists
|
|
5
|
-
*
|
|
4
|
+
* Lists translation keys in compact format — optimized for browsing and exploration.
|
|
5
|
+
* Returns paginated results with namespace deduplication to minimize token usage.
|
|
6
|
+
*
|
|
7
|
+
* USE THIS for:
|
|
8
|
+
* - Browsing keys (finding what exists)
|
|
9
|
+
* - Checking which keys are missing a translation
|
|
10
|
+
* - Getting key IDs for use with updateKeys
|
|
11
|
+
*
|
|
12
|
+
* Use getTranslations instead when you need actual translation text.
|
|
13
|
+
*
|
|
14
|
+
* RESPONSE FORMAT:
|
|
15
|
+
* - tot: total matching keys (before pagination)
|
|
16
|
+
* - ret: keys returned in this page
|
|
17
|
+
* - has_more: true → increment page to fetch next batch
|
|
18
|
+
* - nss: namespace lookup table — each key's ns field is an index into this array
|
|
19
|
+
* - k: key items (k=name, ns=namespace index, id=uuid, src=source text, tl=translated langs)
|
|
20
|
+
* - note: optional warning (e.g., large project hint to use filters)
|
|
6
21
|
*
|
|
7
22
|
* EXAMPLES:
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* - Find
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
23
|
+
* - List first page: { project: "org/project" }
|
|
24
|
+
* - Find "login" keys: { project: "org/project", search: "login" }
|
|
25
|
+
* - Find keys missing Turkish: { project: "org/project", missingLanguage: "tr" }
|
|
26
|
+
* - Filter by namespace: { project: "org/project", namespaces: ["auth", "common"] }
|
|
27
|
+
* - Next page: { project: "org/project", page: 2 }
|
|
28
|
+
* - Larger page: { project: "org/project", limit: 50 }
|
|
13
29
|
*/
|
|
14
30
|
import { z } from "zod";
|
|
15
31
|
import { executeTool, projectInputProperty, projectSchema, success, } from "../base-tool.js";
|
|
16
32
|
const inputSchema = projectSchema.extend({
|
|
17
33
|
search: z.union([z.string(), z.array(z.string())]).optional(),
|
|
18
|
-
languages: z.array(z.string()).optional(),
|
|
19
34
|
namespaces: z.array(z.string()).optional(),
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
missingLanguage: z.string().optional(),
|
|
36
|
+
page: z.number().int().min(1).default(1),
|
|
37
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
22
38
|
});
|
|
23
39
|
export const listKeys = {
|
|
24
40
|
definition: {
|
|
25
41
|
name: "listKeys",
|
|
26
|
-
description: `
|
|
42
|
+
description: `Browse translation keys in compact format. Optimized for exploration — use getTranslations when you need actual translation text.
|
|
43
|
+
|
|
44
|
+
PAGINATION:
|
|
45
|
+
- Response includes tot (total), ret (returned), has_more — increment page for next batch
|
|
46
|
+
- Default: page=1, limit=20
|
|
27
47
|
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
48
|
+
NAMESPACE DEDUPLICATION:
|
|
49
|
+
- nss field is the namespace lookup table (array of strings)
|
|
50
|
+
- Each key's ns field is an index into nss (saves tokens on repeated namespaces)
|
|
51
|
+
- e.g. nss=["auth","common"] and ns=0 means the key belongs to "auth"
|
|
52
|
+
|
|
53
|
+
NOTE FIELD:
|
|
54
|
+
- Large projects (>500 keys) return a note field warning to use filters
|
|
55
|
+
- Apply search, namespaces, or missingLanguage to narrow results
|
|
31
56
|
|
|
32
57
|
FILTER OPTIONS:
|
|
58
|
+
- search: Key name search (partial match, single string or array for OR)
|
|
33
59
|
- namespaces: Filter by namespace(s)
|
|
34
|
-
-
|
|
35
|
-
-
|
|
60
|
+
- missingLanguage: Find keys with no translation for this language (e.g., "tr")
|
|
61
|
+
- fields: Which fields to include per key (default: id, sourceText, translatedLanguages)
|
|
36
62
|
|
|
37
63
|
EXAMPLES:
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- Get missing Turkish translations: { languages: ["tr"], status: "missing" }
|
|
43
|
-
- Get specific keys: { keys: ["auth.login.title", "auth.login.button"] }
|
|
44
|
-
|
|
45
|
-
Response includes namespaceDetails: a map of namespace metadata (name, keyCount, description, context with team/domain/aiPrompt/tags) for all namespaces present in the result.`,
|
|
64
|
+
- Browse all keys: { project: "org/project" }
|
|
65
|
+
- Find "login" keys: { project: "org/project", search: "login" }
|
|
66
|
+
- Missing Turkish: { project: "org/project", missingLanguage: "tr" }
|
|
67
|
+
- Next page: { project: "org/project", page: 2, limit: 50 }`,
|
|
46
68
|
inputSchema: {
|
|
47
69
|
type: "object",
|
|
48
70
|
properties: {
|
|
49
71
|
...projectInputProperty,
|
|
50
72
|
search: {
|
|
51
73
|
type: "string",
|
|
52
|
-
description: "
|
|
53
|
-
},
|
|
54
|
-
languages: {
|
|
55
|
-
type: "array",
|
|
56
|
-
items: { type: "string" },
|
|
57
|
-
description: "Language codes to search in and return (e.g., ['tr', 'de']). If omitted with search, searches source text. If omitted without search, returns all languages.",
|
|
74
|
+
description: "Search keys by name (partial match, case-insensitive). Single string or array for multi-term OR search.",
|
|
58
75
|
},
|
|
59
76
|
namespaces: {
|
|
60
77
|
type: "array",
|
|
61
78
|
items: { type: "string" },
|
|
62
|
-
description: "Filter
|
|
79
|
+
description: "Filter to keys in these namespace(s)",
|
|
63
80
|
},
|
|
64
|
-
|
|
65
|
-
type: "array",
|
|
66
|
-
items: { type: "string" },
|
|
67
|
-
description: "Fetch specific keys by exact name",
|
|
68
|
-
},
|
|
69
|
-
status: {
|
|
81
|
+
missingLanguage: {
|
|
70
82
|
type: "string",
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
description: "Return only keys missing a translation for this language code (e.g., 'tr', 'de')",
|
|
84
|
+
},
|
|
85
|
+
page: {
|
|
86
|
+
type: "number",
|
|
87
|
+
description: "Page number (1-indexed, default: 1)",
|
|
88
|
+
},
|
|
89
|
+
limit: {
|
|
90
|
+
type: "number",
|
|
91
|
+
description: "Keys per page (default: 20, max: 100)",
|
|
73
92
|
},
|
|
74
93
|
},
|
|
75
94
|
required: ["project"],
|
|
76
95
|
},
|
|
77
96
|
},
|
|
78
97
|
execute: (client, args) => executeTool(args, inputSchema, async (input, { workspaceId, projectSlug }) => {
|
|
79
|
-
const result = await client.mcp.
|
|
98
|
+
const result = await client.mcp.listKeys.query({
|
|
80
99
|
orgSlug: workspaceId,
|
|
81
100
|
projectSlug,
|
|
82
101
|
search: input.search,
|
|
83
|
-
languages: input.languages,
|
|
84
102
|
namespaces: input.namespaces,
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
missingLanguage: input.missingLanguage,
|
|
104
|
+
page: input.page,
|
|
105
|
+
limit: input.limit,
|
|
87
106
|
});
|
|
88
107
|
return success(result);
|
|
89
108
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listKeys.js","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"listKeys.js","sourceRoot":"","sources":["../../src/tools/listKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;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,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC7D,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,C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pB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CACF;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-i18n/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "MCP server for Better i18n translation management - AI-powered translation workflow for Cursor, Claude, and other AI assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"bin": {
|
|
10
|
-
"better-i18n-mcp": "./dist/index.js"
|
|
11
|
-
"better-i18n-mcp-http": "./dist/http.js"
|
|
10
|
+
"better-i18n-mcp": "./dist/index.js"
|
|
12
11
|
},
|
|
13
12
|
"files": [
|
|
14
13
|
"dist",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"prepublishOnly": "npm run clean && npm run build && chmod +x ./dist/index.js ./dist/http.js"
|
|
52
51
|
},
|
|
53
52
|
"dependencies": {
|
|
54
|
-
"@better-i18n/mcp-types": "^0.
|
|
53
|
+
"@better-i18n/mcp-types": "^0.8.0",
|
|
55
54
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
56
55
|
"@trpc/client": "^11.0.0",
|
|
57
56
|
"zod": "^3.25.1"
|