Skip to main content
Glama

Text To Embedding

text_to_embedding

Converts text strings into vector embeddings for semantic search, similarity comparison, and NLP tasks.

Instructions

Generate text embeddings using AI models.

Converts text into vector embeddings for semantic search, similarity comparison, and other NLP tasks. Accepts a single string or a list of strings.

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": {
      "input": "<input>"
    },
    "name": "text_to_embedding"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesText string or list of text strings to embed
modelNoEmbedding model name (e.g., 'Bge_M3_FP16')Bge_M3_FP16
webhook_urlNoHTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here
webhook_secretNo32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript
return_result_in_responseNoReturn embedding inline

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about whether the call is synchronous or job-based, cost implications, rate limits, or how the webhook parameters change behavior. The only behavioral hints (webhook notification, inline result) live in the schema, not the description.

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?

Two short sentences, front-loaded with the core action and followed by purpose and input flexibility. No filler, though the second sentence is largely redundant with the schema.

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?

With an output schema present and full parameter documentation, the description only needs to cover purpose and usage, which it does adequately. It falls short on model selection guidance and the asynchronous/webhook behavior that the five-parameter surface implies.

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 all five parameters are already documented, including the string-or-list input and webhook semantics. The description's note that it 'accepts a single string or a list of strings' merely restates the schema, so baseline 3 applies.

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 ('Generate text embeddings') and clarifies the output form (vector embeddings) plus intended uses (semantic search, similarity comparison, NLP tasks). It implicitly separates itself from sibling modalities like text_to_image or text_to_audio, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Lists use cases (semantic search, similarity comparison, other NLP tasks), which implies when to reach for it, but gives no when-not guidance, no mention of the price/cost sibling, and no advice on choosing a model or batching strategy.

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