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
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The model to use (e.g., 'llama3.2', 'codellama', 'mistral', 'llava', 'deepseek-ocr') | |
| images | No | Array of image file paths or base64-encoded images for vision models | |
| prompt | Yes | The prompt to generate from | |
| system | No | Optional system prompt | |
| max_tokens | No | Maximum tokens to generate | |
| temperature | No | Temperature for generation (0.0-2.0, default: 0.8) |