Skip to main content
Glama
MCP Ollama Server

MCP Ollama Server

by MikeyBeez

ollama_generate

Generate text responses from Ollama models by sending prompts, with optional system prompts, streaming, and token/temperature controls.

Instructions

Generate a response from an Ollama model

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": {
      "prompt": "<prompt>"
    },
    "name": "ollama_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel name (e.g., llama3.2, mistral, deepseek-r1)llama3.2
promptYesThe prompt to send to the model
streamNoStream the response
systemNoSystem prompt (optional)
max_tokensNoMaximum tokens to generate
temperatureNoTemperature for sampling (0.0 to 1.0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing: it does not say the model must already be pulled (relevant given the ollama_pull sibling), whether calls are local/free, how streaming affects the return shape, or what a generation response looks like. Only the word "Generate" signals a read-like inference call rather than a mutation.

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?

A single front-loaded sentence with zero redundancy. It is efficient, though the brevity borders on under-specification rather than tight writing.

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?

For a six-parameter inference tool with no annotations and no output schema, the description leaves real gaps: return format, streaming behavior, and the prerequisite that the named model exists locally. The rich schema partly compensates for parameter documentation, which keeps this from scoring lower.

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 every parameter (model, prompt, stream, system, max_tokens, temperature) is already documented with types and defaults. The description adds no extra meaning, such as model-name resolution rules or how stream interacts with the response, which is the expected baseline when the schema does the work.

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 ("Generate a response") and resource ("an Ollama model"), so the core action is unambiguous. It gives no hint of how it differs from the sibling ollama_chat (single-shot completion vs. conversation), so differentiation is left to the caller.

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

Usage Guidelines2/5

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

Provides no when-to-use guidance, no preconditions, and no mention of alternatives such as ollama_chat or ollama_embeddings. The agent must infer entirely from the name and siblings which tool fits a given task.

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