chat
Chat completion (small open models) ($0.002 per call, paid via MPP on Tempo). OpenAI-style chat with open-weight models on Cloudflare Workers AI: gemma-4-26b-a4b (default), granite-4-micro (fastest), gpt-oss-20b (all Apache-2.0). Send messages[] or a prompt; up to ~6k input tokens and 1,024 output tokens per call, flat price. Returns the reply, token usage and finish reason. Daily capacity is limited; when it is reached you get 402 and are not charged. HTTP POST https://mpp-ai.fmf-x402.workers.dev/mpp/chat. This MCP wrapper does not settle payment by itself; call with an MPP Payment Authorization header, or use mppx against the HTTP route.
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
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| prompt | No | ||
| system | No | ||
| messages | No | [{role: system|user|assistant, content}] | |
| reasoning | No | include the model reasoning text if it produces one (default false) | |
| max_tokens | No | 1-1024 (default 512) | |
| temperature | No | 0-2 (default 0.6) |