Skip to main content
Glama

opencode_provider_test

Destructive

Test a provider's connectivity by creating a temporary session, sending a trivial prompt, and verifying the response to debug authentication issues.

Instructions

Quick-test whether a provider is working. Creates a temporary session, sends a trivial prompt, checks the response, and cleans up. Great for debugging auth issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDNoSpecific model ID to test. If omitted, discovers the provider default or first available model.
variantNoModel variant
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
providerIdYesProvider ID to test (e.g. 'anthropic', 'openrouter')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4/5.0
Behavior3/5

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

The annotations already indicate destructiveHint=true and idempotentHint=false, which signal that this tool creates and cleans up a temporary session. The description adds context about the temporary nature and side effects (creates a session, cleans up). However, it doesn't disclose potential side effects like cost (if the provider is paid) or that it might leave artifacts if cleanup fails. Given the annotations carry the destructive hint, the description adds moderate value but doesn't fully elaborate on edge cases.

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

Conciseness5/5

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

The description is two sentences and front-loads the core action. Every sentence is informative: the first states the purpose and process, the second gives a contextual use case. No filler or redundancy. It's appropriately concise.

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

Completeness4/5

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

The description is sufficient for an agent to understand what the tool does and when to use it. It covers the primary use case (debugging auth) and hints at the process. With the output schema present and annotations covering destructive behavior, the description doesn't need to explain return values or side effects in detail. Slight gap: no mention of time requirements or failure handling, but given the tool is a quick test, this is acceptable.

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 100%, so the schema documents all five parameters with descriptions. The description adds no extra parameter-level detail beyond what's in the schema. For example, 'format' and 'modelID' are already explained. The description mentions 'providerId' implicitly but doesn't add usage nuances. Given full schema coverage, the baseline is 3, and the description doesn't elevate it.

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

Purpose5/5

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

The description clearly states the purpose: 'Quick-test whether a provider is working.' It specifies the exact process (creates a temporary session, sends a trivial prompt, checks the response, cleans up) and the target resource (provider). It is distinct from sibling tools like opencode_provider_list (listing) or opencode_provider_models (model discovery), as it focuses on testing connectivity and auth.

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

Usage Guidelines4/5

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

The description explicitly states when to use: 'Great for debugging auth issues.' It implies that for other provider-related tasks (e.g., listing models, configuring), one would use other tools. However, it does not explicitly mention alternatives or when NOT to use it (e.g., not for performance testing), but the purpose is clear enough for an agent to infer.

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

Deploy Server

Other Tools