Skip to main content
Glama

llm_generate

Generate text using an LLM with automatic routing to the best provider and fallback. Supports three-part prompts for improved quality.

Instructions

Generate text using an LLM. Routes to the best available provider with automatic fallback. Supports three-part prompts (system/context/instruction) for improved quality.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoSpecific model ID (e.g. "claude-sonnet-4-20250514", "gpt-4o", "gemini-2.5-flash", "llama-3.3-70b-versatile")
promptYesThe user prompt to send to the LLM (legacy flat format). Use context+instruction for better results.
strictNoWhen true, only try the first resolved provider and disable fallback.
systemNoOptional system prompt — role, personality, constraints
contextNoBackground information, data, or documents for the task
projectNoProject scope for credential resolution (e.g. "ghagga", "md-evals"). Falls back to global credentials if not found.
providerNoPreferred provider ID (e.g. "anthropic", "openai", "google", "groq", "openrouter", "cerebras", "zai", "nvidia", "mistral", "sambanova", "hyperbolic", "claude-cli")
maxTokensNoMaximum output tokens (default: 4096)
instructionNoThe actual task or question to perform
Behavior3/5

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

No annotations provided, so the description must cover behavioral traits. It discloses routing and fallback behavior, but lacks details on idempotency, cost, error handling, or return format. This is adequate but incomplete.

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 sentences, front-loaded with the primary action. Every sentence adds value: main purpose, routing feature, and prompt quality tip. No redundancy or wasted words.

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?

With 9 parameters, 100% schema coverage, no output schema, and moderate complexity (routing, fallback), the description gives a good overview but fails to specify return format or error behavior. Lacks completeness for a tool with this complexity.

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 the schema already documents all 9 parameters. The description adds context about using system/context/instruction together for improved quality, which is helpful but not additive beyond the schema.

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 clearly states 'Generate text using an LLM' and distinguishes from siblings like local_llm_generate by mentioning automatic routing and fallback. It also highlights the three-part prompt feature, making the purpose specific and actionable.

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 description implies using three-part prompts (system/context/instruction) for better quality, but does not explicitly compare to local_llm_generate or other tools. There is no guidance on when to use this tool versus alternatives, nor any exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JNZader/mcp-llm-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server