Skip to main content
Glama

Send a chat request

chat

Sends messages to any chat model id through POST /v1/chat/completions and returns the answer, the token usage and what the request cost. system adds instructions, image_urls lets a model that sees images look at them (a file generate made works), web_search lets the model search while it answers. Billed to the key in the MCP request's Authorization header (Bearer sk-ullm-live-...); without one it fails.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model": "<model>",
      "messages": "<messages>"
    },
    "name": "chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesA chat model id from list_models.
systemNoInstructions placed ahead of the conversation as a system message.
messagesYesThe conversation, OpenAI chat format.
image_urlsNoImage URLs attached to the last user message, for the chat models that take images (input_modalities in list_models). A file generate made works.
max_tokensNoCap on completion tokens.
web_searchNoTrue: the model may search the web while it answers (billed per search, the price in GET /v1/catalog server_tools).
temperatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly=false, openWorld=true, non-idempotent, non-destructive, but the description adds real behavioral context beyond them: billing happens per call and per web search, the response includes cost, and the request fails without a Bearer key. That authentication-failure mode and cost accounting are exactly what an agent needs before invoking an open-world billable tool.

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?

It is front-loaded with what the tool does and then explains the three notable options, so the important information comes first. The single dense paragraph is efficient but slightly run-on, and the raw endpoint path and Bearer prefix detail are marginally beyond what most agents need.

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?

For a 7-parameter, non-idempotent, open-world tool with no output schema, the description covers what comes back (answer, token usage, cost), the auth requirement, and the side-effect billing model. Only the unmentioned temperature/max_tokens tuning parameters and any rate-limit behavior are left out, which is minor given 86% schema coverage.

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

Parameters4/5

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

Schema coverage is already 86%, so most parameters are self-documenting. The description still adds value with the cross-tool hint that a file produced by generate works as an image_urls entry, and by framing system as instructions placed ahead of the conversation; temperature and max_tokens are left entirely to the schema.

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 states a concrete verb and resource ('Sends messages to any chat model id') and names the transport (POST /v1/chat/completions) plus the return payload (answer, usage, cost). It does not explicitly contrast itself with siblings like generate or search, so an agent must infer when a chat completion is preferred over those.

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?

Guidance is implied through feature descriptions: web_search 'lets the model search while it answers' and image_urls is for 'a model that sees images', which hints at the capability gating. There is no explicit when-to-use versus generate/search or when-not-to-use statement, and no stated preconditions such as needing a model id from list_models (that only appears in the schema).

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.