Skip to main content
Glama

completions

Read-only

OpenAI-compatible text completions (legacy /v1/completions) — Drop-in OpenAI legacy Completions API: POST {prompt, max_tokens (1-2048, default 256), temperature (0-2), stop (string or up to 4), echo} and get a text_completion object with choices[0].text, finish_reason and usage. Powered by Llama 3.3 70B. Point any OpenAI SDK, LangChain or LlamaIndex client at base URL https://api.polyform.org/v1. One prompt per call, no streaming. Price: $0.01 USDC (Base, via x402).

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": {
      "prompt": "<prompt>"
    },
    "name": "completions"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYesThe three primary colors of light are

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses price ($0.01 USDC via x402), model (Llama 3.3 70B), output shape (text_completion with choices[0].text, finish_reason, usage), base URL, and limits (one prompt per call, no streaming). The annotations already cover read-only/open-world behavior, and the description adds rich operational context.

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?

Front-loads purpose and packs useful details into a dense paragraph. It is efficient overall, though the payload list that does not match the schema adds confusing bulk.

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

Completeness3/5

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

Covers endpoint, output, pricing, and model for a simple one-parameter tool, but the unsupported parameter list makes the invocation contract incomplete and misleading. No output schema exists, so explaining the return shape is a plus.

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

Parameters2/5

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

The schema exposes only the 'prompt' parameter, but the description presents a POST payload with max_tokens, temperature, stop, and echo as if they were accepted parameters. That mismatch can lead an agent to pass unsupported fields; the only correct addition is 'one prompt per call'. Baseline would be 3 with high schema coverage, but the misleading extra parameters lower this.

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?

The description names the exact API (legacy /v1/completions), the resource (text completions), and the backing model. It distinguishes this from chat-style completions by calling out 'legacy', 'one prompt per call', and 'no streaming'.

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?

Provides clear context for using it as a drop-in OpenAI legacy Completions endpoint with SDKs like LangChain or LlamaIndex. It does not explicitly say when to prefer chat_completions or when not to use this tool, so guidance is strong but not exhaustive.

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