Skip to main content
Glama
mxchris18
by mxchris18

verify_provider_key

Verify an API key and retrieve live available models for supported LLM and embedding providers. Call this before any operation requiring a provider to avoid hardcoding model names.

Instructions

Verify an LLM or embedding API key and return the live list of models available for that key. Call this BEFORE any operation that requires an LLM or embedding provider — never assume or hardcode model names.

Returns: key validity, list of available model names (live from the provider's API), and an error message if the key is invalid.

Supported LLM providers: openai, anthropic, gemini Supported embedding providers: openai, cohere, gemini, mistral, voyage

The API key can be omitted if the corresponding env var is set (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, COHERE_API_KEY, MISTRAL_API_KEY, VOYAGE_API_KEY).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoThe API key to verify. Can be omitted if the corresponding env var is set.
providerYesProvider to verify. LLM: 'openai', 'anthropic', 'gemini'. Embedding: 'openai', 'cohere', 'gemini', 'mistral', 'voyage'.
provider_typeYes'llm' for text generation models (used in extract_data, extract_crawl, contextual_retrieval). 'embedding' for vector embedding models (used in sync_to_vectordb).
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses return values (key validity, model list, error message) and mentions that API keys can be omitted. It does not mention side effects, rate limits, or idempotency, but for a verification tool, the behavioral traits are adequately covered.

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 concise, comprising three clear sentences that front-load the primary purpose. It states the action, return values, and supported providers without any extraneous information. Every sentence adds value.

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

Completeness5/5

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

Given there is no output schema, the description fully describes return values (key validity, model list, error). It lists all supported providers and explains how the key can be omitted. The tool is straightforward, and the description covers everything needed for an agent to use it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining that 'provider_type' indicates whether models are used for LLM or embedding, with examples of where they are applied (extract_data, sync_to_vectordb). It also elaborates on the 'api_key' parameter's optionality with env var names, going beyond the schema.

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 tool's purpose: verifying an API key and returning live available models. It uses specific verbs ('verify', 'return') and identifies the resource (LLM/embedding API key). This clearly distinguishes it from sibling tools like 'extract_data' or 'sync_to_vectordb' which perform different operations.

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 the tool: 'Call this BEFORE any operation that requires an LLM or embedding provider' and advises against hardcoding model names. It lists supported providers and notes that the API key can be omitted if env vars are set. However, it does not explicitly discuss scenarios where the tool should not be used or contrast it with alternatives, though the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mxchris18/scrapedatshi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server