Skip to main content
Glama

opencode_auth

Configure provider authentication by setting an API key, OAuth token, or well-known credential for a specified provider, so AI coding agents can access that provider.

Instructions

Set provider authentication. Action: set (configure API key for a provider)

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": {
      "action": "<action>",
      "providerId": "<providerId>",
      "type": "<type>",
      "key": "<key>"
    },
    "name": "opencode_auth"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesAPI key
typeYesAuth type
actionYes
providerIdYesProvider ID (e.g. 'cerebras')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden. It does not disclose that this is a persistent write of a secret, whether an existing credential is overwritten, whether the key is validated against the provider, or how oauth/wellknown types differ behaviorally from api keys. For a credential-mutation tool with zero annotation coverage, that is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short clauses, front-loaded with the verb and resource, with no filler. The parenthetical partly duplicates the action enum, which is minor waste but not harmful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Four required parameters, no annotations, and no output schema mean the description should explain what happens on success or failure and what the auth types mean. It covers none of that, leaving an agent unable to predict the effect of a call that stores a secret.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75% and the schema already documents key, type, and providerId with an example. The description adds essentially nothing beyond that, only hinting that the key is provider-scoped; the baseline 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: 'Set provider authentication,' which tells an agent this configures credentials for a provider. It does not differentiate itself from the sibling opencode_provider tool, so an agent cannot tell from the text alone which one to reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only guidance is 'Action: set (configure API key for a provider),' which merely restates the single enum value of the action parameter. There is no statement of when to use this versus opencode_provider or opencode_config, and no prerequisites such as needing a valid key first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.