Skip to main content
Glama

Chat Completions (v4)

lyzr_chat_completions_v4

Generate chat completions using a model and messages via the OpenAI-compatible v4 endpoint. Configure sampling, token limits, and tool use for custom responses.

Instructions

OpenAI-compatible v4 chat/completions endpoint (model + messages).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of completions (default 1)
seedNoSampling seed
stopNoStop sequence(s)
userNoEnd-user identifier
modelYesThe model name
toolsNoTool definitions
top_pNoTop-p
streamNoWhether to stream (default false)
messagesYesOpenAI-style chat messages
max_tokensNoMax tokens (legacy)
temperatureNoSampling temperature
tool_choiceNoTool choice strategy
stream_optionsNoStreaming options
response_formatNoResponse format spec
presence_penaltyNoPresence penalty
frequency_penaltyNoFrequency penalty
max_completion_tokensNoMax completion tokens
Behavior2/5

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

The description adds only 'OpenAI-compatible' and '(model + messages)' beyond the annotations. It does not disclose implications of readOnlyHint=false and openWorldHint=true, such as potential side effects from tool calls or streaming behavior, which would be valuable for a chat completion endpoint.

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, front-loaded sentence that immediately conveys the essential compatibility and required inputs. It loses a point because 'v4' redundantly repeats the title and the sentence could have used the scarce space to include usage differentiation.

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?

This is a complex 17-parameter endpoint with no output schema and many related sibling tools, yet the description is too sparse to guide correct invocation. It leaves out response format, streaming behavior, and how this endpoint differs from other chat completion variants, making it inadequate for confident 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?

The input schema has 100% description coverage for all 17 parameters, so the description is not required to explain them. The mention of 'model + messages' only reinforces the schema's required fields without adding new meaning.

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 this is an OpenAI-compatible v4 chat/completions endpoint requiring model and messages, which gives a specific resource and identifies the key inputs. However, it does not distinguish itself from sibling tools like lyzr_simple_chat_completions or lyzr_agent_chat_completions, so it falls short of a 5.

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?

There is no guidance on when to use this tool versus alternatives such as lyzr_chat, lyzr_agent_chat_completions, or lyzr_create_inference_v4. The description merely labels it as OpenAI-compatible, which implies a context but does not explicitly state exclusions or preferred scenarios.

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/nandanNM/lyzr-mcp'

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