Skip to main content
Glama

ollama_chat

Read-only

Send multi-turn chat requests to an Ollama model for conversational interactions with history, such as follow-ups or multi-step reasoning. Preserves context across messages.

Instructions

Send a multi-turn chat completion request to an Ollama model. Use this tool for conversational interactions where message history matters — for example, follow-up questions, multi-step reasoning, or dialogue with context. Do not use this for single-prompt completions without history; use ollama_generate instead to avoid the overhead of the messages array. Prerequisites: The 'model' must already be installed locally. Call ollama_list_models to verify availability; use ollama_pull_model to download if missing. Behavior: Read-only (no state changes on the server), not idempotent — each call generates a new response even with identical inputs. No authentication required. No rate limits. Network-dependent; response time varies from seconds to minutes based on model size and prompt length. Safe to retry on timeout. On model-not-found error, returns an error object without throwing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesExact Ollama model identifier. Must match a 'name' value from ollama_list_models output (e.g., 'llama3.1:8b', 'qwen2.5:7b'). Cloud-hosted models use a '-cloud' suffix (e.g., 'deepseek-v3:671b-cloud'). If unsure which models are available, call ollama_list_models first.
systemNoSystem prompt prepended before the messages array. Use this as a shortcut to set model behavior without adding a system-role message to the 'messages' array. If both this field and a system-role message are provided, this field takes precedence.
messagesYesOrdered conversation history sent to the model. Place system instructions first (role 'system'), then alternate user/assistant turns. The model sees all messages in order. If you only need a system prompt with one user message, consider using the 'system' parameter instead of a system-role message.
max_tokensNoMaximum number of tokens to generate in the response. Maps to Ollama's internal 'num_predict' parameter. Use -1 for unlimited generation (model stops at its natural end token). Default is model-dependent, typically ~2048.
temperatureNoSampling temperature controlling output randomness. 0.0 = deterministic (always pick the most likely token), 2.0 = maximum creativity. Default is model-dependent, typically ~0.7. Use low values (0.0–0.3) for factual tasks, higher (0.7–1.0) for creative tasks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError message if the request failed (e.g., model not found). Only present on failure.
modelYesThe model that generated the response.
messageNoThe assistant's response message.
eval_countNoNumber of tokens generated in the response.
total_durationNoTotal time in nanoseconds including load and inference.
Behavior5/5

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

Beyond annotations (readOnly, non-idempotent, non-destructive), the description adds: 'Read-only (no state changes on the server)', 'not idempotent', 'No authentication required', 'No rate limits', 'Network-dependent; response time varies', 'Safe to retry on timeout', and error behavior. No contradiction with annotations.

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?

The description is concise and well-structured: purpose, usage, prerequisites, behavior notes. Each sentence serves a clear purpose, no redundant or filler content. Front-loaded with key information.

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

Completeness5/5

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

Given the tool's complexity (5 params, 2 required), high schema coverage, and existence of output schema, the description covers all essential aspects: purpose, usage context, prerequisites, behavioral quirks, and parameter hints. Return values are not needed due to output schema.

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 100%, but the description adds contextual meaning: explains 'system' field as a shortcut with precedence, describes 'messages' array ordering, and gives temperature guidance (low for factual, high for creative). While schema already defines parameters, the description enriches operational understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Send'), resource ('multi-turn chat completion request to an Ollama model'), and specifies the use case (conversational interactions with history). It explicitly differentiates from sibling tool 'ollama_generate' by advising against single-prompt usage, making the purpose distinct.

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

Usage Guidelines5/5

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

Provides explicit when to use (multi-turn, follow-up, multi-step reasoning) and when not to use (single-prompt, use ollama_generate). Includes prerequisites: model must be installed, with references to ollama_list_models and ollama_pull_model. Also describes error behavior (returns error without throwing on model-not-found), guiding safe handling.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VrtxOmega/Ollama-Omega'

If you have feedback or need assistance with the MCP directory API, please join our Discord server