Skip to main content
Glama

Embed a text

openai_embeddings
Read-only

Use this when the user asks to embed a text with OpenAI, or what that would cost. Returns the model, vector length, tokens used and only the first 10 numbers of the vector, so it cannot be used to search or compare texts. Runs on SingleBrain's account: from 1 credit a call.

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": {
      "text": "<text>"
    },
    "name": "openai_embeddings"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to embed, up to about 8192 tokens
modelNoOne of: text-embedding-3-large, text-embedding-3-small, defaults to text-embedding-3-small

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly, openWorld, non-idempotent) by disclosing the exact return contents, that only the first 10 vector numbers come back, that billing runs on SingleBrain's account at 'from 1 credit a call', and the resulting limitation on use. Cost and auth-charging context is exactly the kind of thing annotations cannot express.

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?

One front-loaded sentence with the trigger first and the caveats after; every clause carries information (output truncation, no search use, credit cost). Slightly run-on with three ideas chained by commas, but no filler to cut.

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?

With no output schema, the description takes on the return-value burden and does it: it enumerates model, vector length, tokens used, and the truncated vector. Combined with the cost note, an agent knows both what it gets back and what the call costs before invoking.

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 both text and model are already documented, including the enum of model names and the default. The description adds no format, syntax, or selection guidance for the model parameter, so it sits at the baseline.

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?

Names a specific verb and resource (embed a text with OpenAI) plus a second concrete use case (cost estimation), which separates it from siblings like openai_chat or openai_list_models. An agent can route to it without opening the schema.

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

Usage Guidelines4/5

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

Opens with an explicit trigger ('Use this when the user asks to embed a text... or what that would cost') and adds a strong when-not: the truncated vector 'cannot be used to search or compare texts.' It stops short of naming a sibling that would handle search/similarity work, so the exclusion is stated without a redirect.

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.