Skip to main content
Glama
Local AI MCP

Local AI MCP

Official
by TMHSDigital

Delegated completion

complete
Read-only

Delegate inference to a chosen local model for cost savings and privacy, with system prompts, JSON-schema validation, vision inputs, and token streaming.

Instructions

DELEGATED INFERENCE: Offload a completion to a model you choose for cost savings and privacy. Without provider, runs on the live LOCAL provider that has the model (never a hosted API unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set); the result's 'provider', 'host' and 'local' fields say where it ran. Supports system prompts, JSON / JSON-Schema output (validated 'parsed' field), seed/topP/topK, image inputs for vision models, and contextLength for long inputs. Streams tokens via MCP progress notifications when the client sends a progressToken.

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>"
    },
    "name": "complete"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoSeed for reproducible sampling
stopNoStop sequences
topKNo
topPNo
modelYesModel id/name to run the completion on
promptNoPlain prompt text (alternative to messages)
streamNoStream tokens (default true). Progress notifications are sent when the client provides a progressToken.
systemNoSystem instruction
optionsNoProvider-specific extras passed through as-is
messagesNoChat messages; content may be a string or text/image parts (vision models)
providerNoProvider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).
maxTokensNoMaximum tokens to generate
temperatureNoSampling temperature
contextLengthNoContext window to run with (Ollama num_ctx). Raise it for long inputs to avoid truncation.
repeatPenaltyNo
repairAttemptsNoWith a json_schema responseFormat: if the output fails validation, send the errors back to the same model and ask for corrected JSON, up to this many times (default 0, max 2). Token usage covers every attempt.
responseFormatNoConstrain output to JSON (json_object) or a JSON Schema (json_schema); the result includes a validated 'parsed' value

Output Schema

NameRequiredDescriptionDefault
hostYes
textYes
localYes
modelYes
parsedNo
providerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.1
    • addedInput schema / properties / repairAttempts
      Added value: +{
      +  "description": "With a json_schema responseFormat: if the output fails validation, send the errors back to the same model and ask for corrected JSON, up to this many times (default 0, max 2). Token usage covers every attempt.",
      +  "maximum": 2,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed20 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / contextLength
      Added value: +{
      +  "description": "Context window to run with (Ollama num_ctx). Raise it for long inputs to avoid truncation.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / maxTokens / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / maxTokens / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / maxTokens / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / messages / description
      Previous value: -"Chat-style messages (alternative to prompt)"New value: +"Chat messages; content may be a string or text/image parts (vision models)"
    • removedInput schema / properties / messages / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / messages / items / properties / content / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "properties": {
      +            "text": {
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "text",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type",
      +            "text"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "properties": {
      +            "data": {
      +              "description": "Base64 image data (no data: prefix)",
      +              "type": "string"
      +            },
      +            "mimeType": {
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "image",
      +              "type": "string"
      +            },
      +            "url": {
      +              "description": "Image URL or data: URL",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / messages / items / properties / content / type
      Removed value: -"string"
    • addedInput schema / properties / options
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Provider-specific extras passed through as-is",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • 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"
      +]
    • addedInput schema / properties / repeatPenalty
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / responseFormat
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "type": {
      +          "const": "json_object",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "name": {
      +          "type": "string"
      +        },
      +        "schema": {
      +          "additionalProperties": {},
      +          "description": "JSON Schema the output must satisfy",
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "type": {
      +          "const": "json_schema",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "schema"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Constrain output to JSON (json_object) or a JSON Schema (json_schema); the result includes a validated 'parsed' value"
      +}
    • addedInput schema / properties / seed
      Added value: +{
      +  "description": "Seed for reproducible sampling",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedInput schema / properties / stream / description
      Previous value: -"Stream tokens from the provider (default true). Progress notifications are sent when the client provides a progressToken."New value: +"Stream tokens (default true). Progress notifications are sent when the client provides a progressToken."
    • addedInput schema / properties / system
      Added value: +{
      +  "description": "System instruction",
      +  "type": "string"
      +}
    • addedInput schema / properties / topK
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / topP
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "host": {
      +      "type": "string"
      +    },
      +    "local": {
      +      "type": "boolean"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "parsed": {},
      +    "provider": {
      +      "type": "string"
      +    },
      +    "text": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "provider",
      +    "host",
      +    "local",
      +    "model",
      +    "text"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.4.0

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare readOnly/non-destructive/closed-world, so the bar is lower, and the description still adds substantial context: where execution actually lands (`provider`, `host`, `local` fields), the local-only default and the fallback flag, schema-validated `parsed` output, and token streaming via MCP progress notifications when a progressToken is supplied. These are execution facts an agent could not recover from the annotations or schema.

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?

It is front-loaded with the purpose, then the provider-resolution rule, then a compact feature list, and no sentence is pure filler. It runs long and dense as a single paragraph, which slightly hurts scanability, but the information density justifies the length.

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?

For a 17-parameter tool with nested message/responseFormat objects and an output schema, the description covers the behaviors an agent most needs to call it correctly: provider resolution, output locality fields, structured-output validation, vision inputs, context window, and streaming. Remaining gaps are minor since the output schema and 82% schema coverage handle return shape and most parameter detail.

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 82%, so the baseline is 3, and the description earns above that by explaining what the schema only names: contextLength as a num_ctx window that must be raised to avoid truncation on long inputs, responseFormat's validated `parsed` field, and image content parts for vision models. Undocumented-in-prose params such as temperature, topK, stop, and repairAttempts are covered by the schema itself.

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?

The opening sentence states a specific verb and resource — offload a completion to a chosen model — and frames the value (cost, privacy). It is clear what the tool does, but it never distinguishes itself from the sibling `delegate` tool, despite the near-identical framing, so an agent must infer the split.

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?

There is real usage guidance for the provider parameter (omit it and the server picks a live LOCAL provider; hosted only under LOCAL_AI_ALLOW_HOSTED_FALLBACK), which tells the agent how to call it safely. But there is no explicit statement of when to choose this over `delegate`, `embed`, or `benchmark`, so routing between siblings is left to inference.

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