Skip to main content
Glama

openai_chat_completion

Execute a chat completion using OpenAI models like GPT-4o with options for prompt, system instruction, and response format.

Instructions

Run a chat completion with an OpenAI model (GPT-4o, GPT-4, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYes
modelNoModel ID, e.g. gpt-4o, gpt-4o-mini (default: gpt-4o-mini)
promptNoConvenience: single user message (alternative to messages array)
system_promptNoSystem instruction (used with prompt param)
messagesNoArray of {role, content} message objects (alternative to prompt)
max_tokensNo
temperatureNo
top_pNo
nNo
response_formatNoe.g. {type: 'json_object'}
seedNo
org_idNoOpenAI organization ID (optional)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states the high-level action ('run a chat completion') without disclosing behavioral traits like cost, rate limits, safety implications, or output format. Critical details for a generative AI tool are missing.

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?

The description is a single, concise sentence that front-loads the verb and object. It is efficient but could incorporate more contextual information without expanding length unduly.

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?

For a tool with 12 parameters, no output schema, and multiple sibling tools performing similar tasks, the description is too sparse. It does not explain return values, error handling, special behaviors (e.g., streaming), or how to structure messages. The agent lacks sufficient context for correct invocation.

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

Parameters2/5

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

Schema description coverage is 50%, meaning half of the 12 parameters lack descriptions in the schema. The description adds no parameter-level information beyond naming the model family. It fails to compensate for the missing schema descriptions, especially for parameters like max_tokens, temperature, and seed.

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 clearly states the tool runs a chat completion with OpenAI models (GPT-4o, GPT-4, etc.). It identifies the specific provider and task, distinguishing it from siblings by model family, but does not explicitly contrast with other chat completion tools like Anthropic or Groq.

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 implies usage when an OpenAI chat completion is needed, but provides no explicit guidance on when to use this tool versus alternatives, no prerequisites, and no exclusion criteria. The only hint is the focus on OpenAI models.

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/malamutemayhem/unclick'

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