Parser-branch source excerpt for the tools capability, ollama tag v0.20.3 Fetched 2026-11-19 (UTC) with curl from raw.githubusercontent.com; byte counts and sha256 of the fetched files are recorded below. Verbatim excerpts only, no local edits. S1 https://raw.githubusercontent.com/ollama/ollama/v0.20.3/server/images.go bytes=27056 sha256=b6ca34a8001a927c36db977fb149175159cfd8464d67a95242234ae1fc521d69 124: builtinParser := parsers.ParserForName(m.Config.Parser) 125: // Check for tools capability 126: v, err := m.Template.Vars() 127: if err != nil { 128: slog.Warn("model template contains errors", "error", err) 129: } 130: if slices.Contains(v, "tools") || (builtinParser != nil && builtinParser.HasToolSupport()) { 131: capabilities = append(capabilities, model.CapabilityTools) 132: } 133: https://raw.githubusercontent.com/ollama/ollama/v0.20.3/model/parsers/cogito.go bytes=9092 sha256=d64c5dc26204e790ef2d705ec7753a39164a789278ca2b383c20ad99d904e790 func (p *CogitoParser) HasToolSupport() bool { return true } https://raw.githubusercontent.com/ollama/ollama/v0.20.3/model/parsers/gemma4.go bytes=20962 sha256=3add289a09ef5a4e666b35f9cba93e193666db984437d3d16a9fba87b489d262 func (p *Gemma4Parser) HasToolSupport() bool { return true } https://raw.githubusercontent.com/ollama/ollama/v0.20.3/model/parsers/deepseek3.go bytes=8365 sha256=7f32a7a8d37b4cb24443a31a6890e50fc4083d080463fcf531acc8a9d0660c38 func (p *DeepSeek3Parser) HasToolSupport() bool { return true } https://raw.githubusercontent.com/ollama/ollama/v0.20.3/model/parsers/lfm2.go bytes=16621 sha256=157568f465b7f637a0c9b76b835eb9cc0b79e0aff2a2de7bf262809290ab01b1 func (p *LFM2Parser) HasToolSupport() bool { return true } https://raw.githubusercontent.com/ollama/ollama/v0.20.3/model/parsers/ministral.go bytes=8970 sha256=ce6de6196ae7daafe3ff6a6e0fac6324d1188d061af2e1c8e738173bce919af9 func (p *MinistralParser) HasToolSupport() bool { return true } Note: the probe published with this post was run against builds that configure no parser, so it exercises the template branch only. No ollama binary was rebuilt from these tags for this excerpt.