Skip to main content
Glama

chat

Chat with a text LLM and get reply text, token usage and credit cost. Supports strict JSON Schema output and an idempotency key for safe transport retries. Pass either a single prompt or a full messages array. Charged in credits from the connected account.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
modelNoLLM model slug. Omit to use the default model. Pass a flagship reasoning model for hard tasks or a fast cheap model for simple ones.
promptNoSingle user message. Use this OR messages (messages wins if both are set).
messagesNoFull conversation as [{role, content}] with role one of system/user/assistant. Content is plain text.
max_tokensNoCap the reply length in tokens.
temperatureNoSampling temperature (0 = deterministic).
idempotency_keyNoStable key for safely retrying the same chat request without a duplicate model call or charge. Reusing it with different input returns a conflict.
response_formatNoOptional structured-output contract. json_schema responses are validated by Clipia before success and billing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With annotations declaring readOnlyHint=false and idempotentHint=false, the description adds real context: the call is charged in credits, JSON-Schema replies are validated 'before success and billing', and reusing an idempotency key with different input returns a conflict — consistent with, not contradicting, idempotentHint=false. Rate limits and latency are not covered.

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

Conciseness5/5

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

Four short sentences, front-loaded with what the tool does and returns, then transport/idempotency, then input shape, then billing. No filler; every sentence carries distinct information.

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 tool with nested objects and no output schema, the description names the return fields and explains billing and retry semantics, which is enough to call it correctly. It does not say what happens if both prompt and messages are omitted, given zero required parameters.

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 including the nested response_format is already documented. The description only restates the prompt/messages alternative, adding no syntax or format detail beyond the schema — the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Chat with a text LLM') and names the return payload (reply text, token usage, credit cost). The word 'text' cleanly distinguishes it from the media-generation siblings like generate_image and generate_video.

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?

Gives actionable selection guidance: omit model to use the default, 'pass a flagship reasoning model for hard tasks or a fast cheap model for simple ones', and choose prompt OR messages. It lacks explicit when-not-to-use guidance or routing against siblings such as generate_scenario.

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.