openai_chat_completion

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

Server UnClick @unclick/mcp-server
Category Execute
Risk class High
Parameters 121 required

What openai_chat_completion does on UnClick

AI agents invoke openai_chat_completion to trigger actions in UnClick. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
n number
seed number
model string Model ID, e.g. gpt-4o, gpt-4o-mini (default: gpt-4o-mini)
top_p number
org_id string OpenAI organization ID (optional)
prompt string Convenience: single user message (alternative to messages array)
api_key string Yes
messages object Array of {role, content} message objects (alternative to prompt)
max_tokens number
temperature number
system_prompt string System instruction (used with prompt param)
response_format object e.g. {type: 'json_object'}

Parameters from the server's own tool schema.

Why openai_chat_completion needs a policy

This tool executes arbitrary language model operations based on user-supplied prompts. While not destructive by itself, it can be weaponized to generate code, craft attacks, or produce harmful content depending on how an AI agent frames requests. The blast radius depends on what the model outputs and how downstream tools use those outputs.

From the tool's definition Tool description states it can 'Run a chat completion' with OpenAI models, which is an operation that executes external code/API calls with effects determined by input prompts.

Risk signalsHandles credentials or secrets (api_key) · High parameter count (12 properties)

Questions about openai_chat_completion

What does the openai_chat_completion tool do? +

Run a chat completion with an OpenAI model (GPT-4o, GPT-4, etc.). It is categorised as a Execute tool in the UnClick MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does openai_chat_completion accept? +

openai_chat_completion accepts 12 parameters: n, seed, model, top_p, org_id, prompt, api_key, messages, max_tokens, temperature, system_prompt, response_format. Required: api_key. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on openai_chat_completion? +

Register the UnClick MCP server in PolicyLayer and add a rule for openai_chat_completion: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches UnClick. Nothing to install.

What risk level is openai_chat_completion? +

openai_chat_completion is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit openai_chat_completion? +

Yes. Add a rate_limit block to the openai_chat_completion rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block openai_chat_completion completely? +

Set action: deny in the PolicyLayer policy for openai_chat_completion. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides openai_chat_completion? +

openai_chat_completion is provided by the UnClick MCP server (@unclick/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.