Skip to main content
Glama

Gemini Embedding 2 High-Dimensional (3,072-D) Vector Generator

generate_gemini_embeddings
Read-onlyIdempotent

Generates normalized 3,072-dimensional or 768-dimensional semantic vector embeddings via Google Gemini Embedding 2 for RAG indexing and cosine-similarity search. Use when embedding text passages or queries via L402 Lightning with configurable Matryoshka dimensions; for running live Google Search grounded factual queries, use search_gemini_grounded_web instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'text' ('model' defaults to 'gemini-embedding-2'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
textYesInput text passage, code snippet, or search query to embed into a float vector.
modelNoGemini embedding model version; defaults to 'gemini-embedding-2' when omitted.

Output Schema

NameRequiredDescriptionDefault
modelYesEmbedding model executed.
successYesTrue when vector generation succeeded.
embeddingYesNormalized floating-point embedding vector.
dimensionsYesVector dimensionality returned (e.g. 3072 or 768).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well past the annotations by disclosing statelessness, the 32 KB input cap, 60 RPM rate limit, L402 Lightning payment (10 sats) and a demo mode, plus a 400 error on invalid input. One weak spot: the description advertises 'configurable Matryoshka dimensions' but the schema exposes no dimension parameter, leaving ambiguity about how 3,072 vs 768 is actually selected.

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?

Three sentences, front-loaded with the core purpose and the sibling exclusion before the operational details. Some sentences are heavily clause-stacked (payment, limits, error code in one breath), which slightly hurts scanability but not comprehension.

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

Completeness5/5

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

For a two-parameter, read-only embedding call with an output schema and full annotation coverage, everything an agent needs to call it correctly is present: input limit, auth/payment path, rate limit, model default, and failure mode. Return-value details are correctly left to the output schema.

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 100%, so baseline is 3; the description still adds value by restating the default model and framing 'text' as passage, code snippet, or query. It adds little beyond the schema for 'model' (the enum and default are already documented), so it lands just above baseline rather than at 5.

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?

States a specific verb (generates), resource (normalized semantic vector embeddings), producer (Gemini Embedding 2), and dimensionality (3,072-D / 768-D), plus the downstream use (RAG indexing, cosine search). It also explicitly names the sibling it is not (search_gemini_grounded_web), so an agent can separate it from the other Gemini tools without opening a schema.

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

Usage Guidelines5/5

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

Explicitly says 'Use when embedding text passages or queries' and gives an exclusion rule with the named alternative for grounded factual queries. The when/when-not pair is unambiguous and immediately actionable.

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.