Skip to main content
Glama

QuickBuild agent tools (x402)

LLM chat completion (Llama 3.1 8B default)

llm_chat
Read-only

[PAID $0.003 USDC per call via x402 on Base; errors are free] One-shot LLM completion on Cloudflare Workers AI with a minimal interface: give prompt (and optionally system, or OpenAI-style messages), get {text, model, finish_reason, usage}. Models: llama-3.1-8b (default), llama-3.2-3b, llama-3.2-1b, mistral-7b, granite-4.0-micro. max_tokens capped at 512, input up to 24000 chars, Llama Guard 3 safety check, 503 "capacity" when the daily budget is used up. Errors are never charged. All params optional: with none it answers a short sample question. For the OpenAI wire format use POST /v1/chat/completions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel alias (default llama-3.1-8b).
promptNoUser message. Optional: defaults to a short sample question.
systemNoOptional system instruction.
messagesNoOptional OpenAI-style history (POST JSON).
max_tokensNoMax output tokens (default/cap 512).
temperatureNoSampling temperature.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint/openWorldHint already covering safety, the description adds substantial non-schema context: $0.003 USDC per call via x402, errors never charged, a 503 'capacity' response when the daily budget is exhausted, a Llama Guard 3 safety check, and concrete caps (512 max_tokens, 24000 input chars). These are behavioral traits an agent cannot infer from annotations alone.

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?

A single dense paragraph that front-loads the paid-call caveat before the functional summary, and every clause carries information (return shape, model list, limits, failure mode). It is long but not padded, with only mild redundancy around the free-errors notice.

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

Completeness5/5

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

No output schema exists, but the description explicitly documents the return shape {text, model, finish_reason, usage}, the input/output limits, the safety gate, and the 503 failure path. An agent has everything needed to call it correctly and interpret the result.

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 the baseline is 3, but the description goes beyond it by clarifying the relationship between prompt, system, and messages (OpenAI-style history) and by enumerating the model aliases and the 512 token cap. It adds meaningful routing semantics over the structured fields.

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+resource ('One-shot LLM completion on Cloudflare Workers AI') and names the default model plus the full model roster. It is clearly distinguishable from siblings like summarize, translate, generate_image, and text_to_speech by being a general-purpose completion endpoint.

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?

Explains both invocation styles (prompt/system vs OpenAI-style messages) and gives the condition for the OpenAI wire format via POST /v1/chat/completions, plus the note that calling with no params returns a sample answer. It stops short of explicitly contrasting when to prefer this over summarize/translate siblings, so no exclusions are drawn.

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