Skip to main content
Glama
Gemini MCP Server

Gemini MCP Server

by jon-the-dev

generate_text

Generates text from prompts using Google Gemini models and lets you control model, temperature, token limits, JSON output, search grounding, and conversation context.

Instructions

Generate text using Google Gemini with advanced features

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": "generate_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
topKNoTop-k sampling parameter
topPNoTop-p (nucleus) sampling parameter
modelNoSpecific Gemini model to usegemini-2.5-flash
promptYesThe prompt to send to Gemini
jsonModeNoEnable JSON mode for structured output
groundingNoEnable Google Search grounding for up-to-date information
maxTokensNoMaximum tokens to generate
jsonSchemaNoJSON schema for structured output (when jsonMode is true)
temperatureNoTemperature for generation (0-2)
conversationIdNoID for maintaining conversation context
safetySettingsNoSafety settings for content filtering
systemInstructionNoSystem instruction to guide model behavior

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.2.2

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'advanced features' but doesn't specify what these are (e.g., grounding, JSON mode, safety settings). It doesn't disclose rate limits, authentication needs, costs, or what happens on failure. The description is too vague to help an agent understand behavioral traits beyond basic generation.

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?

The description is a single, efficient sentence that gets straight to the point. It's appropriately sized for a tool with this complexity. However, it could be more front-loaded by specifying key capabilities (e.g., 'Generate text with options for JSON output, grounding, and safety controls') to immediately convey value.

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

Completeness2/5

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

For a complex tool with 12 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'advanced features' entail, doesn't guide usage relative to siblings, and leaves behavioral aspects unclear. The agent would struggle to use this effectively without relying heavily on the schema alone.

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 12 parameters thoroughly. The description adds no parameter-specific information beyond implying 'advanced features' might relate to some parameters. Baseline is 3 since the schema does heavy lifting, but the description doesn't compensate with additional context about parameter interactions or best practices.

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?

The description clearly states the verb ('generate') and resource ('text') with the specific technology ('using Google Gemini'). It distinguishes from siblings like analyze_image or embed_text by focusing on text generation. However, it doesn't explicitly differentiate from count_tokens or list_models in terms of when to use each.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions 'advanced features' but doesn't specify what makes it advanced compared to basic text generation or when to choose it over other siblings like analyze_image for multimodal tasks. There's no mention of prerequisites, limitations, or typical use cases.

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