Skip to main content
Glama

AI chat

ai_chat

Starts an EdgeCloud chat completion and returns the reply and tokens used. Charges credits by tokens, only on success; price it first with quote or price_list. Needs sign-in (auth_challenge then auth_verify).

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": {
      "messages": "<messages>"
    },
    "name": "ai_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel name from price_list
messagesYesChat turns: [{role: system|user|assistant, content}]
quote_idNoThe quote_id returned by quote (valid 5 minutes, single use). Use instead of max_price_credits
max_tokensNoMost output tokens, 1-2000
max_price_creditsNoThe most you'll pay for this call, in Wave credits. Needed unless you pass quote_id; the call fails if the price is higher

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / max_price_credits / description
      Previous value: -"The most you'll pay, in credits"New value: +"The most you'll pay for this call, in Wave credits. Needed unless you pass quote_id; the call fails if the price is higher"
    • addedInput schema / properties / max_price_credits / minimum
      Added value: +0
    • addedInput schema / properties / max_tokens / description
      Added value: +"Most output tokens, 1-2000"
    • addedInput schema / properties / max_tokens / minimum
      Added value: +1
    • addedInput schema / properties / messages / description
      Added value: +"Chat turns: [{role: system|user|assistant, content}]"
    • addedInput schema / properties / messages / minItems
      Added value: +1
    • addedInput schema / properties / model / description
      Added value: +"Model name from price_list"
    • addedInput schema / properties / quote_id / description
      Added value: +"The quote_id returned by quote (valid 5 minutes, single use). Use instead of max_price_credits"
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already flag this as a non-read-only, open-world, non-idempotent call, and the description usefully adds that credits are charged by tokens and only on success, plus the auth prerequisite. What it leaves out is failure behavior beyond pricing (retries, partial consumption, timeouts) and any rate or concurrency constraints. Additional context is real but thin for a credit-spending mutation.

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?

Three short sentences, front-loaded with what the tool does, then cost semantics, then the auth prerequisite. No filler, and the ordering matches how an agent would plan the call. Minor density cost from stacking three separate concerns into a single paragraph.

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?

There is no output schema, and the description compensates by stating the return contents (reply plus tokens used). It also covers cost and auth, the two things most likely to make the call fail. Missing only edge-case behavior such as token-limit defaults or what happens when a quote expires mid-call.

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 100%, so every field is already documented, which sets a baseline of 3. The description still adds connective meaning by explaining that quote/price_list drive the model and quote_id/max_price_credits pricing path, letting the agent connect parameters to the sibling workflow rather than reading each field in isolation.

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 names a specific verb and resource ("Starts an EdgeCloud chat completion") and states what comes back ("the reply and tokens used"), so an agent knows exactly what the call does. It does not explicitly distinguish itself from other generation-style siblings such as image_generate, which keeps it 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 Guidelines4/5

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

It gives concrete preconditions: price the call first with quote or price_list, and sign in via auth_challenge then auth_verify. That is a real ordering of sibling calls rather than a vague hint. It stops short of stating when NOT to use this tool (e.g. preferring a cheaper model or a non-chat alternative).

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.

Resources