@i18n-agent/mcp-client 1.8.242 → 1.8.244

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 (2) hide show
  1. package/mcp-client.js +20 -3
  2. package/package.json +1 -1
package/mcp-client.js CHANGED
@@ -325,7 +325,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
325
325
  */
326
326
  {
327
327
  name: 'check_translation_status',
328
- description: 'Check the status and progress of an async translation job. Returns progress percentage, elapsed time, and downloads completed translation results when finished.',
328
+ description: 'Check the status and progress of an async translation job. Returns progress percentage, elapsed time, and downloads completed translation results when finished. Supports cursor-based pagination for download URLs to reduce token usage when checking jobs with many languages (recommended for jobs with >10 languages).',
329
329
  inputSchema: {
330
330
  type: 'object',
331
331
  properties: {
@@ -333,6 +333,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
333
333
  type: 'string',
334
334
  description: 'The job ID returned from translate_text (>100 texts or >50,000 chars) or translate_file (>100KB) for async processing',
335
335
  },
336
+ languageCursor: {
337
+ type: 'string',
338
+ description: 'Optional: Starting language code for pagination (e.g., "de", "es"). Omit to start from the beginning. Use the nextCursor value from the previous response to get the next page of languages.',
339
+ },
340
+ pageSize: {
341
+ type: 'number',
342
+ description: 'Optional: Number of languages to return per page (default: 10). Recommended for jobs with many languages to reduce token usage. Without pagination, responses for 32-language jobs can be ~11k tokens.',
343
+ },
336
344
  },
337
345
  required: ['jobId'],
338
346
  },
@@ -1601,19 +1609,28 @@ function getCodeBlockLanguage(fileType) {
1601
1609
 
1602
1610
  // Handler for checking translation status
1603
1611
  async function handleCheckTranslationStatus(args) {
1604
- const { jobId } = args;
1612
+ const { jobId, languageCursor, pageSize } = args;
1605
1613
 
1606
1614
  if (!jobId) {
1607
1615
  throw new Error('jobId is required');
1608
1616
  }
1609
1617
 
1618
+ // Build arguments with optional pagination params
1619
+ const requestArgs = { jobId };
1620
+ if (languageCursor !== undefined) {
1621
+ requestArgs.languageCursor = languageCursor;
1622
+ }
1623
+ if (pageSize !== undefined) {
1624
+ requestArgs.pageSize = pageSize;
1625
+ }
1626
+
1610
1627
  const mcpRequest = {
1611
1628
  jsonrpc: '2.0',
1612
1629
  id: Date.now(),
1613
1630
  method: 'tools/call',
1614
1631
  params: {
1615
1632
  name: 'check_translation_status',
1616
- arguments: { jobId }
1633
+ arguments: requestArgs
1617
1634
  }
1618
1635
  };
1619
1636
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-agent/mcp-client",
3
- "version": "1.8.242",
3
+ "version": "1.8.244",
4
4
  "description": "🌍 i18n-agent MCP Client - 48 languages, AI-powered translation for Claude, Claude Code, Cursor, VS Code, Codex. Get API key at https://app.i18nagent.ai",
5
5
  "main": "mcp-client.js",
6
6
  "bin": {