Skip to main content
Glama

openai_chat_completion

Generate responses from OpenAI models like GPT-4o by providing a prompt or messages, with options for system instructions, token limits, 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 exist, so the description bears full responsibility. It only states 'Run a chat completion' without disclosing behavioral traits such as read/write nature, error handling, streaming, rate limits, or authentication requirements beyond the schema.

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 primary action. It could be slightly more structured, but it is not verbose.

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?

With 12 parameters, no output schema, and no annotations, the description is minimal. It lacks details on output format, error handling, or workflow context, making it insufficient for a complex tool.

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 50%, and the description does not add parameter-specific meaning beyond what the schema already provides (e.g., model, prompt). It lists model examples but does not explain parameter usage nuances.

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 it runs a chat completion with OpenAI models, giving specific examples like GPT-4o and GPT-4. However, it does not differentiate from sibling chat completion tools (e.g., anthropic_create_message, cohere_chat).

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 description provides no guidance on when to use this tool vs alternatives like Anthropic or Cohere, nor does it mention any prerequisites or exclusions. With many sibling chat tools, this is a significant gap.

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