Skip to main content
Glama
Ollama MCP Server
by ngc-shj

ollama_generate

Generate single-turn text with Ollama models, including vision models via image input, using a prompt, optional system prompt, and controls for temperature and max tokens.

Instructions

Generate text using an Ollama model. Use this for single-turn text generation. Supports vision models (llava, llama3.2-vision, deepseek-ocr) with image 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>",
      "prompt": "<prompt>"
    },
    "name": "ollama_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesThe model to use (e.g., 'llama3.2', 'codellama', 'mistral', 'llava', 'deepseek-ocr')
imagesNoArray of image file paths or base64-encoded images for vision models
promptYesThe prompt to generate from
systemNoOptional system prompt
max_tokensNoMaximum tokens to generate
temperatureNoTemperature for generation (0.0-2.0, default: 0.8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/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. The only real disclosure is vision-model support with image input; it says nothing about whether output streams, latency/model-loading behavior, whether the model must be pulled first (a sibling exists for that), error behavior for unknown models, or authentication/local-server requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the core purpose front-loaded and no filler. The vision-model note follows the primary use case in a logical order, and nothing is repeated from the name or schema verbatim beyond what is needed.

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?

There is no output schema, so some indication of the return shape (generated string, timing/token stats, or streaming chunks) would help, and nothing is said about it. For a six-parameter generation tool with zero annotations, the definition covers the happy path but leaves response format and failure modes unaddressed.

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 each of the six parameters is already documented, which sets the baseline at 3. The description adds only a marginally useful note that image input is for vision models, and even names a model (llama3.2-vision) not listed in the schema's examples.

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 concrete verb and resource ('Generate text using an Ollama model') and adds a scope qualifier ('single-turn text generation') that implicitly distinguishes it from ollama_chat. It never names the sibling explicitly, so differentiation requires the agent to infer what 'single-turn' rules out.

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?

'Use this for single-turn text generation' gives a positive usage condition, and the vision-model sentence signals the multimodal case. There is no explicit when-not or alternative (e.g., 'for multi-turn conversation use ollama_chat'), so the routing guidance is implied rather than stated.

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