opencode_auth_set
Store authentication credentials for a provider (e.g., API key) globally so they are shared across all projects. Provide provider ID, auth type, and key value to enable authenticated access.
Instructions
Set authentication credentials for a provider (e.g. API key). Credentials are stored globally and shared across all projects.
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": {
"providerId": "<providerId>",
"type": "<type>",
"key": "<key>"
},
"name": "opencode_auth_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | API key or credential value | |
| type | Yes | Auth type (e.g. 'api') | |
| providerId | Yes | Provider ID (e.g. 'anthropic') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |