scan_hardcoded_texts
Detects hardcoded user-facing strings in React Native, React, Next.js, and Flutter projects using AST analysis. Returns source locations, confidence scores, and suggested i18n keys without modifying files.
Instructions
Scan a React Native project (as well as React, Next.js, and Flutter) or requested scope for hardcoded strings using AST analysis. Returns detected strings with source locations, AST context, classification, confidence score, semantic role, suggested key and namespace, without modifying any files.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "scan_hardcoded_texts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Optional scope: file path, directory path, glob pattern, or an array of them to limit scanning. | |
| exclude | No | Optional glob patterns to exclude from scanning. | |
| include | No | Optional glob patterns to include for scanning. | |
| projectPath | No | Optional path to the project root directory. Defaults to the current working directory. | |
| ambiguousOnly | No | Whether to return only ambiguous candidates requiring agent/human evaluation (default: false). | |
| minConfidence | No | Minimum confidence score threshold (0.0 to 1.0) for returned items. | |
| onlyUserFacing | No | Whether to return only user-facing strings (default: true). Set to false to include technical strings. |