Skip to main content
Glama

generate_with_vertex

使用 Vertex AI Gemini 模型生成文本。

    Args:
        prompt: 用户提示词
        model: gemini-2.5-flash (默认), gemini-2.5-pro 或 gemini-2.5-flash-lite;其他名称会交由 Vertex 校验
        temperature: 生成多样性
        max_tokens: 最大输出 token 数。注意:Gemini 2.5 的 "thinking" token 也计入此上限,
            过小的值(如 512)可能截断可见回答,建议 1024 以上
        top_p: Top-P 采样参数
        top_k: Top-K 采样参数
        system_instruction: 系统指令
    

Input Schema

NameRequiredDescriptionDefault
modelNogemini-2.5-flash
top_kNo
top_pNo
promptYes
max_tokensNo
temperatureNo
system_instructionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / model / default
      Previous value: -"gemini-2.0-flash"New value: +"gemini-2.5-flash"
  2. Added

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It adds a genuinely useful behavioral note (Gemini 2.5 thinking tokens count toward max_tokens, values like 512 may truncate visible output, 1024+ recommended) and notes unknown model names are validated by Vertex. It omits auth requirements, latency/rate limits, failure behavior, and return shape.

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?

Purpose is front-loaded in a single sentence followed by an organized Args block; nothing is wasted. The only weakness is that three sampling-parameter lines add little beyond their names.

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 7-parameter generation tool with no annotations and no output schema, the description covers inputs adequately but never states what is returned (raw text, object, usage metadata) or how errors surface. Given the absent output schema, that return-value gap leaves the definition only minimally complete.

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 0%, so the description must document all parameters, and it does name all seven. model (with defaults and validation behavior) and max_tokens (with the thinking-token caveat) are explained well; temperature/top_p/top_k are thin restatements of their names, hence not a 5.

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 ('使用 Vertex AI Gemini 模型生成文本'), and the provider/model reference distinguishes it from generate_with_deepseek. It stops short of explicitly contrasting with sibling generation tools, but the provider-scoped phrasing is enough for an agent to tell them apart.

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?

There is no when-to-use guidance, no mention of alternatives such as generate_with_deepseek or call_dashscope_mcp, and no prerequisites. The model options are listed but framed as parameter detail, not as a reason to pick this tool.

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