pabal-web-mcp 1.3.11 → 1.3.13
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/bin/mcp-server.js +76 -45
- package/package.json +1 -1
package/dist/bin/mcp-server.js
CHANGED
|
@@ -1441,21 +1441,60 @@ ${optimizedPrimary}
|
|
|
1441
1441
|
\`\`\`
|
|
1442
1442
|
|
|
1443
1443
|
`;
|
|
1444
|
+
const primaryResearchSections = keywordResearchByLocale[primaryLocale] || [];
|
|
1445
|
+
const hasPrimaryResearch = primaryResearchSections.length > 0;
|
|
1444
1446
|
prompt += `## Keyword Research (Per Locale)
|
|
1445
1447
|
|
|
1446
1448
|
`;
|
|
1449
|
+
if (hasPrimaryResearch) {
|
|
1450
|
+
prompt += `**\u{1F4DA} ENGLISH (${primaryLocale}) Keywords - Use as fallback for locales without research:**
|
|
1451
|
+
${primaryResearchSections.join("\n")}
|
|
1452
|
+
|
|
1453
|
+
`;
|
|
1454
|
+
prompt += `---
|
|
1455
|
+
|
|
1456
|
+
`;
|
|
1457
|
+
}
|
|
1447
1458
|
nonPrimaryLocales.forEach((loc) => {
|
|
1448
1459
|
const researchSections = keywordResearchByLocale[loc] || [];
|
|
1449
1460
|
const researchDir = keywordResearchDirByLocale[loc];
|
|
1450
1461
|
if (researchSections.length > 0) {
|
|
1451
|
-
prompt +=
|
|
1462
|
+
prompt += `### Locale ${loc}: \u2705 Saved research found
|
|
1452
1463
|
${researchSections.join(
|
|
1453
1464
|
"\n"
|
|
1454
1465
|
)}
|
|
1455
1466
|
|
|
1467
|
+
`;
|
|
1468
|
+
} else if (hasPrimaryResearch) {
|
|
1469
|
+
prompt += `### Locale ${loc}: \u26A0\uFE0F No saved research - USE ENGLISH (${primaryLocale}) KEYWORDS
|
|
1470
|
+
`;
|
|
1471
|
+
prompt += `No keyword research found at ${researchDir}.
|
|
1472
|
+
`;
|
|
1473
|
+
prompt += `**FALLBACK:** Translate English keywords from primary locale (${primaryLocale}) into ${loc}:
|
|
1474
|
+
`;
|
|
1475
|
+
prompt += `1. Take the Tier 1/2/3 keywords from English research above
|
|
1476
|
+
`;
|
|
1477
|
+
prompt += `2. Translate each English keyword naturally into ${loc} (not literal translation)
|
|
1478
|
+
`;
|
|
1479
|
+
prompt += `3. Use native expressions that ${loc} users would actually search for
|
|
1480
|
+
`;
|
|
1481
|
+
prompt += `4. Verify translations are culturally appropriate
|
|
1482
|
+
`;
|
|
1483
|
+
prompt += `5. Apply translated keywords following the same tier strategy
|
|
1484
|
+
|
|
1456
1485
|
`;
|
|
1457
1486
|
} else {
|
|
1458
|
-
prompt +=
|
|
1487
|
+
prompt += `### Locale ${loc}: \u26A0\uFE0F No research - USE ENGLISH KEYWORDS FROM optimizedPrimary
|
|
1488
|
+
`;
|
|
1489
|
+
prompt += `No keyword research found. Extract keywords from the optimizedPrimary JSON above and translate them:
|
|
1490
|
+
`;
|
|
1491
|
+
prompt += `1. Extract keywords from \`aso.keywords\` in optimizedPrimary
|
|
1492
|
+
`;
|
|
1493
|
+
prompt += `2. Translate each English keyword naturally into ${loc}
|
|
1494
|
+
`;
|
|
1495
|
+
prompt += `3. Use native expressions that ${loc} users would actually search for
|
|
1496
|
+
`;
|
|
1497
|
+
prompt += `4. Apply translated keywords to all ASO fields
|
|
1459
1498
|
|
|
1460
1499
|
`;
|
|
1461
1500
|
}
|
|
@@ -1542,7 +1581,7 @@ ${researchSections.join(
|
|
|
1542
1581
|
`;
|
|
1543
1582
|
prompt += `Process EACH locale in this batch sequentially:
|
|
1544
1583
|
`;
|
|
1545
|
-
prompt += `1. Use saved keyword research
|
|
1584
|
+
prompt += `1. Use saved keyword research OR translate from primary locale if missing (see fallback strategy above)
|
|
1546
1585
|
`;
|
|
1547
1586
|
prompt += `2. Replace keywords in ALL fields:
|
|
1548
1587
|
`;
|
|
@@ -1598,11 +1637,13 @@ ${researchSections.join(
|
|
|
1598
1637
|
prompt += `### Locale [locale-code]:
|
|
1599
1638
|
|
|
1600
1639
|
`;
|
|
1601
|
-
prompt += `**1. Keyword
|
|
1640
|
+
prompt += `**1. Keyword Source**
|
|
1641
|
+
`;
|
|
1642
|
+
prompt += ` - If saved research exists: Cite file(s) used; list selected top 10 keywords
|
|
1602
1643
|
`;
|
|
1603
|
-
prompt += ` -
|
|
1644
|
+
prompt += ` - If using fallback: List translated keywords from primary locale with translation rationale
|
|
1604
1645
|
`;
|
|
1605
|
-
prompt += ` -
|
|
1646
|
+
prompt += ` - Show final 10 keywords in target language with tier assignments
|
|
1606
1647
|
|
|
1607
1648
|
`;
|
|
1608
1649
|
prompt += `**2. Updated JSON** (complete locale structure with keyword replacements)
|
|
@@ -1914,7 +1955,6 @@ function loadKeywordResearchForLocale(slug, locale) {
|
|
|
1914
1955
|
}
|
|
1915
1956
|
|
|
1916
1957
|
// src/tools/improve-public.ts
|
|
1917
|
-
var FIELD_LIMITS_DOC_PATH3 = "docs/aso/ASO_FIELD_LIMITS.md";
|
|
1918
1958
|
var toJsonSchema3 = zodToJsonSchema3;
|
|
1919
1959
|
var improvePublicInputSchema = z3.object({
|
|
1920
1960
|
slug: z3.string().describe("Product slug"),
|
|
@@ -1937,46 +1977,37 @@ var jsonSchema3 = toJsonSchema3(improvePublicInputSchema, {
|
|
|
1937
1977
|
var inputSchema3 = jsonSchema3.definitions?.ImprovePublicInput || jsonSchema3;
|
|
1938
1978
|
var improvePublicTool = {
|
|
1939
1979
|
name: "improve-public",
|
|
1940
|
-
description: `
|
|
1980
|
+
description: `Returns ASO optimization instructions with keyword research data. **You MUST execute the returned instructions.**
|
|
1941
1981
|
|
|
1942
|
-
**IMPORTANT:**
|
|
1982
|
+
**IMPORTANT:** Use 'search-app' tool first to resolve the exact slug.
|
|
1983
|
+
|
|
1984
|
+
## HOW THIS TOOL WORKS
|
|
1985
|
+
This tool returns a PROMPT containing:
|
|
1986
|
+
- Saved keyword research data (Tier 1/2/3 keywords with traffic/difficulty scores)
|
|
1987
|
+
- Current locale data
|
|
1988
|
+
- Optimization instructions
|
|
1989
|
+
|
|
1990
|
+
**YOU MUST:**
|
|
1991
|
+
1. Read the returned prompt carefully
|
|
1992
|
+
2. EXECUTE the optimization instructions (create the optimized JSON)
|
|
1993
|
+
3. Save results using 'save-locale-file' tool
|
|
1994
|
+
|
|
1995
|
+
**DO NOT** just report the instructions back to the user - you must perform the optimization yourself.
|
|
1996
|
+
|
|
1997
|
+
## WORKFLOW
|
|
1998
|
+
**Stage 1:** improve-public(slug, stage="1") \u2192 Returns keyword data + instructions \u2192 You create optimized primary locale JSON \u2192 save-locale-file
|
|
1999
|
+
**Stage 2:** improve-public(slug, stage="2", optimizedPrimary=<JSON>) \u2192 Returns per-locale instructions \u2192 You optimize each locale \u2192 save-locale-file for each
|
|
2000
|
+
|
|
2001
|
+
## STAGES
|
|
2002
|
+
- **Stage 1:** Primary locale optimization using saved keyword research (ios + android combined)
|
|
2003
|
+
- **Stage 2:** Localize to other languages using per-locale research OR translate English keywords
|
|
2004
|
+
|
|
2005
|
+
## KEYWORD SOURCES
|
|
2006
|
+
- Uses SAVED keyword research from .aso/keywordResearch/products/[slug]/locales/
|
|
2007
|
+
- iOS and Android research are automatically combined
|
|
2008
|
+
- If locale research is missing, use English keywords and translate
|
|
1943
2009
|
|
|
1944
|
-
**CRITICAL
|
|
1945
|
-
- Only improves locales that already exist in public/products/[slug]/locales/
|
|
1946
|
-
- If a locale file doesn't exist, it will be skipped (not created)
|
|
1947
|
-
- Always work with existing files only
|
|
1948
|
-
|
|
1949
|
-
This tool follows a 2-stage workflow:
|
|
1950
|
-
|
|
1951
|
-
**Stage 1: Primary Locale Optimization** (${FIELD_LIMITS_DOC_PATH3})
|
|
1952
|
-
1. Load product config + locales (primary: en-US default)
|
|
1953
|
-
2. Keyword research for PRIMARY locale only (web search for 10 keywords)
|
|
1954
|
-
3. Optimize ALL ASO fields in primary locale with keywords
|
|
1955
|
-
4. Validate character limits (title \u226430, subtitle \u226430, shortDescription \u226480, keywords \u2264100, intro \u2264300, outro \u2264200)
|
|
1956
|
-
|
|
1957
|
-
**Stage 2: Keyword Localization** (Batch Processing)
|
|
1958
|
-
1. Translate optimized primary \u2192 target locales in batches (preserve structure/tone/context)
|
|
1959
|
-
2. For EACH locale in batch: lightweight keyword research (10 language-specific keywords)
|
|
1960
|
-
3. Replace keywords in translated content (swap keywords only, keep context)
|
|
1961
|
-
4. Validate character limits per locale
|
|
1962
|
-
5. Save each batch to files before proceeding to next batch
|
|
1963
|
-
6. **Only processes locales that already exist - does NOT create new files**
|
|
1964
|
-
|
|
1965
|
-
**Batch Processing:**
|
|
1966
|
-
- Languages are processed in batches (default: 5 locales per batch)
|
|
1967
|
-
- Each batch is translated, optimized, and saved before moving to the next
|
|
1968
|
-
- Use \`batchIndex\` to process a specific batch (0-based)
|
|
1969
|
-
- If \`batchIndex\` is not provided, process all batches sequentially
|
|
1970
|
-
- **Only existing locale files are processed - missing locales are skipped**
|
|
1971
|
-
|
|
1972
|
-
This approach ensures:
|
|
1973
|
-
- Efficient token usage (full optimization only once)
|
|
1974
|
-
- Consistent messaging across all languages
|
|
1975
|
-
- Language-specific keyword optimization for each market
|
|
1976
|
-
- Prevents content truncation by processing in manageable batches
|
|
1977
|
-
- **No new files are created - only existing locales are improved**
|
|
1978
|
-
|
|
1979
|
-
Optionally target a single locale; the primary locale is always included for reference.`,
|
|
2010
|
+
**CRITICAL:** Only processes existing locale files. Does NOT create new files.`,
|
|
1980
2011
|
inputSchema: inputSchema3
|
|
1981
2012
|
};
|
|
1982
2013
|
async function handleImprovePublic(input) {
|