Skip to main content
Glama

ollama_chat

Read-only

Send multi-turn chat requests to Ollama models for conversational interactions requiring message history, such as follow-up questions or multi-step reasoning with context.

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.
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.
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.
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.
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.

Output Schema

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

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

While annotations already provide readOnlyHint=true, destructiveHint=false, and idempotentHint=false, the description adds substantial behavioral context beyond these annotations. It explicitly states 'Read-only (no state changes on the server), not idempotent — each call generates a new response even with identical inputs,' then adds details about authentication, rate limits, network dependencies, timeout retry safety, and error handling that aren't covered by 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 efficiently structured with purpose, usage guidelines, prerequisites, and behavioral details in logical order. Every sentence serves a clear purpose without redundancy, and it's appropriately sized for a tool with 5 parameters and significant behavioral considerations.

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, the description provides comprehensive context including purpose differentiation, usage guidelines, prerequisites, behavioral characteristics, and parameter guidance. With annotations covering safety aspects and an output schema presumably handling return values, the description fills all necessary gaps without over-explaining what's already structured elsewhere.

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?

With 100% schema description coverage, the baseline would be 3, but the description adds valuable context about parameter relationships and usage strategies. It explains when to use the 'system' parameter versus system-role messages in the messages array, and provides guidance on message ordering and role purposes that complements the schema's technical descriptions.

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 specific action ('Send a multi-turn chat completion request') and resource ('to an Ollama model'), explicitly distinguishing it from the sibling tool ollama_generate for single-prompt completions. It provides concrete examples of use cases like follow-up questions and multi-step reasoning.

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?

The description provides explicit guidance on when to use this tool ('for conversational interactions where message history matters') and when not to use it ('Do not use this for single-prompt completions without history'), naming the alternative tool ollama_generate. It also includes prerequisites about model installation and verification steps.

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