Skip to main content
Glama
Local AI MCP

Local AI MCP

Official
by TMHSDigital

Delegated embeddings

embed
Read-onlyIdempotent

Generate vector representations for one text or an array of texts through a local model provider; returns exactly one vector per input.

Instructions

DELEGATED EMBEDDINGS: Generate embeddings for a string or an array of texts. Without provider, runs on the live local provider that has the model. Always returns one vector per input.

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

Input Schema

NameRequiredDescriptionDefault
inputYesText or array of texts to embed
modelYesEmbedding model id/name
providerNoProvider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).

Output Schema

NameRequiredDescriptionDefault
hostYes
localYes
modelYes
providerYes
dimensionsYes
embeddingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / provider / description
      Previous value: -"Optional provider id"New value: +"Provider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set)."
    • changedInput schema / properties / provider / enum
      Previous value: -[
      -  "ollama",
      -  "lmstudio",
      -  "moonshot",
      -  "openaicompat",
      -  "llamacpp"
      -]New value: +[
      +  "ollama",
      +  "lmstudio",
      +  "llamacpp",
      +  "dockermodelrunner"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "dimensions": {
      +      "type": "number"
      +    },
      +    "embeddings": {
      +      "items": {
      +        "items": {
      +          "type": "number"
      +        },
      +        "type": "array"
      +      },
      +      "type": "array"
      +    },
      +    "host": {
      +      "type": "string"
      +    },
      +    "local": {
      +      "type": "boolean"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "provider": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "provider",
      +    "host",
      +    "local",
      +    "model",
      +    "embeddings",
      +    "dimensions"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds the default routing behavior (live local provider holding the model) and a one-vector-per-input guarantee, but the routing detail is largely restated in the provider schema description, so added value is modest.

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 short sentences with the core capability front-loaded and no filler. The 'DELEGATED EMBEDDINGS:' prefix mildly duplicates the title but otherwise every clause carries information.

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

Completeness4/5

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

With an output schema present, return shape needn't be explained, and all three parameters are fully described in the schema. The description covers routing defaults and output cardinality, leaving only minor gaps such as error behavior for unsupported models.

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%, including the provider enum and the meaning of omitting it, so the baseline is 3. The description adds no syntax, batching, or model-selection semantics beyond what the schema already documents.

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+resource ('Generate embeddings') and the accepted input shapes ('a string or an array of texts'). It is clearly distinct from siblings like complete or delegate by resource, but the description never names an alternative to contrast against.

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?

'Without provider, runs on the live local provider that has the model' gives context for the optional provider path, but there is no explicit when-to-use guidance versus siblings such as complete or fit_check, and no stated exclusions.

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