set_design_file_mapping
Persist custom Kotlin design-file paths for colors, dimensions, or strings in .composebridge/config.json to resolve NEEDS_MANUAL_MAPPING and lock target token files.
Instructions
Sets a designated design/registry file in .composebridge/config.json for a token type.
When to use:
- Call when ComposeBridge stops with NEEDS_MANUAL_MAPPING because design system files are in non-standard paths.
- Call to lock designated target files for colors, dimensions, or strings.
When NOT to use:
- Do not use if the project uses standard design file locations (e.g., Color.kt, AppStrings.kt).
- Do not use for reading existing token mappings (use get_design_file_mappings instead).
Side effects:
- Modifies .composebridge/config.json on disk to persist file mappings.
Args:
token_type: 'color', 'dimension', 'string', or 'all'.
file_path: Relative path to the Kotlin file (e.g. 'composeApp/src/commonMain/kotlin/.../Color.kt').
project_root: Optional path to project root.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"token_type": "<token_type>",
"file_path": "<file_path>"
},
"name": "set_design_file_mapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| token_type | Yes | ||
| project_root | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |