Skip to main content
Glama

generate_text

Generate text with frontier AI language models through Bitcoin Lightning micropayments. Supports document Q&A and vision analysis with no minimum or signup.

Instructions

Generate text using frontier AI language models. Pure per-character pricing (no minimum): Kimi K2.5 (id=6, best, 100 chars/sat, 262K context, vision support, default), GPT-OSS-120B (id=1, better, 333 chars/sat, strong reasoning), Qwen3-32B (id=26, standard, 1000 chars/sat, 119 languages, best value). Supports document Q&A via fileContext and vision analysis via imageBase64 (best model). Stable endpoints — models upgrade automatically. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='generate_text' and the exact prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesValid payment ID (must be paid)
promptYesThe text prompt or question
modelIdNoOptional. Omit for default (best) model.
systemPromptNoOptional system prompt
maxTokensNoMax tokens in response
fileContextNoExtracted file text to include as context
fileNameNoName of the attached file
imageBase64NoBase64 data URI for vision analysis (best model only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / fileContext / description
      Previous value: -"Extracted text from a file (PDF, DOCX, code, etc.) to include as context"New value: +"Extracted file text to include as context"
    • changedInput schema / properties / imageBase64 / description
      Previous value: -"Base64 data URI of an image for vision analysis (Best/K2.5 model only)"New value: +"Base64 data URI for vision analysis (best model only)"
    • changedInput schema / properties / maxTokens / default
      Previous value: -2048New value: +16384
    • changedInput schema / properties / maxTokens / description
      Previous value: -"Maximum tokens in response"New value: +"Max tokens in response"
    • changedInput schema / properties / modelId / description
      Previous value: -"The AI model database ID"New value: +"Optional. Omit for default (best) model."
    • changedInput schema / required
      Previous value: -[
      -  "paymentId",
      -  "prompt",
      -  "modelId"
      -]New value: +[
      +  "paymentId",
      +  "prompt"
      +]
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, description carries full burden. Discloses per-character pricing, model details, automatic upgrades, file/vision support, and payment requirements. Lacks failure modes or rate limits but is otherwise thorough.

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-loaded with purpose and key details; packed with info but slightly long. Could benefit from more structured formatting (e.g., bullet points) but remains clear and efficient.

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?

Given 8 parameters, no output schema, and moderate complexity, description covers core usage, model options, prerequisites (payment), and special features like vision. Lacks output format info but sufficient for agent invocation.

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 baseline is 3. Description adds context: explains model selection (default best), fileContext/imageBase64 usage for Q&A/vision, and paymentId role. Enhances schema understanding.

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?

Specifically states 'Generate text using frontier AI language models' and lists distinct models with capabilities (document Q&A, vision), clearly differentiating from siblings like generate_image or transcribe_audio.

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?

Explicitly requires create_payment with toolName='generate_text' and exact prompt, and mentions no API key needed. Provides clear usage context but doesn't explicitly exclude scenarios or compare with siblings beyond listing features.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.