Skip to main content
Glama

LLM chat completion API: text generation with Llama 4 Scout

llm_chat
Read-only

LLM chat completion and text generation: send a prompt (or an OpenAI messages array with tools and JSON mode) and get an answer from Meta's Llama 4 Scout, up to 1,024 output tokens, in a couple of seconds; OpenAI-compatible at /v1/chat/completions. Use for drafting, summaries, classification, reasoning steps and any quick LLM call without an AI provider account. Example: prompt=Explain x402 in one sentence.. Price $0.002/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
toolsNoOptional OpenAI tools array as JSON (function calling, up to 32 functions); the answer then carries tool_calls
promptYesUser prompt, up to 8,000 characters
systemNoOptional system prompt, up to 2,000 characters
messagesNoOptional OpenAI messages array as JSON (system, user, assistant with tool_calls, tool); replaces prompt and system. Together with tools, at most 20,000 characters
maxTokensNoMaximum output tokens, 1-1024 (default 400)
temperatureNo0-1.5 (default 0.6)
tool_choiceNoOptional: auto, none, required, or a JSON object naming one function
response_formatNoOptional OpenAI response_format as JSON: {"type":"json_object"} or a json_schema

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing cost ($0.002/call, first 25 free, failed calls free), billing paths (x402 USDC or card key/credits), approximate latency ('a couple of seconds'), and the practical meaning of non-idempotency — repeats are charged. The 'reads or computes only and changes nothing' line is consistent with readOnlyHint/destructiveHint=false and corroborates it rather than contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, but the text is a dense semicolon-chained run-on mixing capability, pricing, auth, and cost semantics. The example 'prompt=Explain x402 in one sentence..' has a stray double period and contributes little, and the billing detail could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 8 parameters, the description still covers model identity, token limits, latency, cost, auth, and OpenAI endpoint compatibility, which implies the response shape. It never describes the returned payload (choices/message structure or how tool_calls come back), a minor omission for a generation 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 description coverage is 100%, so every parameter (tools, messages, system, maxTokens, temperature, tool_choice, response_format) is already documented in the schema. The description only echoes that messages/tools/JSON mode exist and restates the 1,024-token cap; the lone example adds no parameter semantics. Baseline 3 applies.

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?

States a specific verb and resource (send a prompt / messages array, get a chat completion), names the underlying model (Meta's Llama 4 Scout), the output cap (1,024 tokens), and the OpenAI-compatible endpoint. It does not, however, distinguish itself from close siblings such as ai_chat, ai_chat_large, or llm_inference, so the agent must infer which one to pick.

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

Usage Guidelines4/5

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

Explicitly lists when to use it: drafting, summaries, classification, reasoning steps, 'any quick LLM call without an AI provider account,' plus a concrete prompt example. There are no exclusions and no named alternative for longer context or other models, which is the main gap given ~30 sibling AI tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.