Skip to main content
Glama

Generate text

generate_text
Read-only

Generate text responses by sending prompts to OpenAI models, with support for image input, web search, and instructions.

Instructions

Send a prompt to an OpenAI model and return its text reply. Pass images to ask a vision-capable model about them

Input Schema

NameRequiredDescriptionDefault
modelYesOpenAI model to use for text generation. Must support image input if images are provided
imagesNoImages to include with the prompt, each as an http(s) URL or a file path on this server's filesystem (PNG, JPEG, WEBP, or GIF)
promptYesThe input text to send to the model
webSearchNoLet the model search the web. Cited pages are listed under Sources in the reply
instructionsNoOptional high-level instructions to steer the model's behavior

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • addedInput schema / properties / webSearch
      Added value: +{
      +  "description": "Let the model search the web. Cited pages are listed under Sources in the reply",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true is consistent with a prompt-and-reply tool, and the description confirms the return is a text reply, but it adds little beyond the schema — web search citation behavior and image format support are already documented in the parameter descriptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the core action and immediately covering the vision variant. No filler.

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?

With no output schema, the description correctly states the return is the model's text reply. For a five-parameter tool it is nearly complete, missing only model-choice or error-behavior context.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters are already well documented in the schema. The description reinforces the images/model constraint but adds no syntax, defaults, or format details beyond what the schema provides.

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?

States a specific verb and resource ('Send a prompt to an OpenAI model and return its text reply') and notes vision capability when images are passed. This implicitly separates it from siblings like generate_image and generate_speech, though it never names them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The image sentence gives a conditional hint (use a vision-capable model when passing images), but there is no explicit when-to-use guidance or exclusion pointing to alternatives such as generate_image for image output or count_tokens for token accounting.

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