Skip to main content
Glama

create_chat_completion

Generate non-streaming chat completions from TokenLab models using OpenAI-compatible API calls. Authenticate with your API key.

Instructions

Create a non-streaming TokenLab OpenAI-compatible Chat Completions call. Requires TOKENLAB_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoOptional number of non-streaming completions.
seedNoOptional deterministic seed for compatible models.
stopNoOptional stop sequence or up to four stop sequences.
userNoOptional end-user identifier.
audioNoOptional audio output configuration.
modelYesPublic TokenLab model ID.
toolsNoOptional OpenAI function tools available to the model.
top_kNoOptional top-k sampling cutoff for compatible models.
top_pNoOptional nucleus sampling probability.
logprobsNoWhether to return output-token log probabilities.
messagesYesOpenAI-compatible conversation messages, including text, image, tool, and function messages.
logit_biasNoOptional per-token logit-bias map.
max_tokensNoOptional maximum generated tokens.
modalitiesNoOptional requested output modalities, such as text or audio.
predictionNoOptional prediction hint for compatible models.
temperatureNoOptional sampling temperature.
tool_choiceNoOptional OpenAI tool-choice setting.
service_tierNoOptional service-tier hint for compatible models.
top_logprobsNoOptional number of likely tokens to include with log probabilities.
response_formatNoOptional response format.
presence_penaltyNoOptional presence penalty.
reasoning_effortNoOptional reasoning-effort hint for compatible models.
frequency_penaltyNoOptional frequency penalty.
parallel_tool_callsNoWhether compatible models may make parallel tool calls.
max_completion_tokensNoOptional completion-token cap for compatible reasoning models.
Behavior2/5

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

With no annotations, the description carries full responsibility for disclosing behavioral traits. It states 'non-streaming' and the API key requirement, but lacks details on error handling, rate limits, response format, or that it is synchronous. This is minimal for a complex API call.

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?

Two sentences, front-loaded with the key action and resource. Every word serves a purpose; no redundancy. Highly concise.

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?

Given 25 parameters, no output schema, and high complexity, the description is too brief. It fails to mention return value structure, error conditions, or that the call is synchronous. Lacks necessary context for safe and effective use.

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 description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter meaning beyond what is in the schema. Baseline 3 is appropriate.

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 action ('Create'), the resource ('non-streaming TokenLab OpenAI-compatible Chat Completions call'), and includes a critical requirement ('Requires TOKENLAB_API_KEY'). It effectively distinguishes from sibling tools like create_anthropic_message and create_gemini_content, which target different providers.

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

Usage Guidelines3/5

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

The description mentions 'non-streaming' to imply usage context but does not explicitly state when to use this tool versus alternatives like create_anthropic_message or create_gemini_content. No when-not-to-use or direct comparisons are provided.

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/hedging8563/tokenlab-mcp-server'

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