Skip to main content
Glama

Generate Content

post_generateContent

The official Google Gemini API endpoint for generating content using Gemini models. This endpoint supports multimodal inputs, including text, images, audio, video, and documents, depending on the capabilities of the selected model. It also supports conversation history, system instructions, function calling, structured JSON output, safety settings, and configurable generation parameters. Group: Google Endpoints. Billing per call: Credits: metered (~235.33 avg).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "post_generateContent"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoJSON request body. Example: {"model":"gemini-4-carbon","contents":[{"role":"user","parts":[{"text":"There are ten birds in a tree. A hunter shoots one. How many are left in the tree?"}]}]}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / body / description
      Previous value: -"JSON request body. Example: {\"model\":\"gemini-4-argon\",\"contents\":[{\"role\":\"user\",\"parts\":[{\"text\":\"There are ten birds in a tree. A hunter shoots one. How many are left in the tree?\"}]}]}"New value: +"JSON request body. Example: {\"model\":\"gemini-4-carbon\",\"contents\":[{\"role\":\"user\",\"parts\":[{\"text\":\"There are ten birds in a tree. A hunter shoots one. How many are left in the tree?\"}]}]}"
  2. Added

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries full burden; it usefully discloses billing (~235.33 avg metered credits per call) and the feature surface. However, it omits auth requirements, rate limits, error behavior, and—since there is no output schema—what the response looks like, so significant behavioral gaps remain.

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

Conciseness3/5

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

Purpose is front-loaded in the first sentence, but the middle sentence is a long capability enumeration and the trailing 'Group: Google Endpoints. Billing per call' metadata feels bolted on. It is informative but somewhat padded rather than tightly structured.

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?

For a single-param, zero-required tool with a fully documented schema and example, the description covers the input surface adequately. Yet it lacks any discussion of the return value (no output schema exists) and authorization behavior, leaving real gaps for a generative endpoint.

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 coverage is 100% and the single body parameter includes a concrete example, so baseline is 3. The description adds conceptual meaning about what the body can carry (multimodal parts, conversation history, system instructions), but does not detail the body structure beyond the schema example.

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: 'the official Google Gemini API endpoint for generating content using Gemini models.' It enumerates capabilities (multimodal, function calling, structured JSON) so an agent understands what it is, but it never names or contrasts with siblings like post_chat_completions or post_responses.

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 lists supported features and notes that support depends on 'the capabilities of the selected model,' which is capability disclosure rather than usage guidance. It gives no explicit when-to-use, when-not, or which sibling to choose for a plain chat vs. generation task.

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