ollama_generate_code_with_context
Generate code using local Ollama models with context from existing files to match project patterns.
Instructions
Generate code using Ollama with context from existing files. Reads reference files to understand patterns.
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>",
"language": "<language>"
},
"name": "ollama_generate_code_with_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Ollama model to use (default: gemma3:27b) | gemma3:12b |
| prompt | Yes | Detailed description of the code to generate | |
| language | Yes | Programming language (e.g., javascript, python, rust) | |
| context_files | No | Array of file paths to use as context/examples |