Write or Update Config.toml with Salesforce Credentials
sf_write_config_tomlOverwrites Config.toml in an existing Ballerina project with fresh Salesforce OAuth2 credentials for credential rotation. Auto-detects sandbox from instance URL and sets secure file permissions.
Instructions
Overwrites Config.toml in an existing Ballerina project with fresh Salesforce OAuth2 credentials. Useful for rotation. Sandbox is auto-detected from sf_base_url. File is written with mode 0600 (owner read/write only).
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": {
"project_path": "<project_path>",
"sf_client_id": "<sf_client_id>",
"sf_client_secret": "<sf_client_secret>",
"sf_refresh_token": "<sf_refresh_token>",
"sf_base_url": "<sf_base_url>"
},
"name": "sf_write_config_toml"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Path to the Ballerina project directory | |
| sf_client_id | Yes | Salesforce Connected App Consumer Key (Client ID) | |
| sf_client_secret | Yes | Salesforce Connected App Consumer Secret (Client Secret) | |
| sf_refresh_token | Yes | Salesforce OAuth2 Refresh Token obtained after authorization | |
| sf_base_url | Yes | Salesforce org instance URL, e.g. https://myorg.my.salesforce.com (sandbox auto-detected from hostname) |