<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl" -->

---
title: Streaming responses with tool calling · Ollama Blog
description: Ollama now supports streaming responses combined with tool calling, letting chat applications stream tokens while also invoking tools in real time. A new...
canonical: https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Streaming responses with tool calling · Ollama Blog | daily.dev
og:description: Ollama now supports streaming responses combined with tool calling, letting chat applications stream tokens while also invoking tools in real time. A new...
og:url: https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl
og:image: https://api.daily.dev/og/posts/c49wMQMsl.png
og:image:alt: Streaming responses with tool calling · Ollama Blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming responses with tool calling · Ollama Blog

**[Ollama](https://daily.dev/sources/ollama)** · 6 min read · 0 upvotes · 0 comments

## Summary

Ollama now supports streaming responses combined with tool calling, letting chat applications stream tokens while also invoking tools in real time. A new incremental parser understands each model's tool-call template structure instead of waiting for full JSON output, enabling streaming and improving reliability by avoiding duplicate tool calls. Examples are provided for cURL, Python, and JavaScript using models like qwen3 and llama3.2, plus guidance on using this with MCP and increasing context window size (32k+) for better tool-calling accuracy.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ollama.com/blog/streaming-tool>

## Questions this post answers

### Does Ollama support streaming responses together with tool calling?

Yes, Ollama now supports streaming chat responses while also calling tools in real time. A new incremental parser references each model's template to detect and separate tool call tokens from regular content, removing the previous requirement to wait for the full generation before parsing JSON to check for a tool call.

_daily.dev surfaces updates like this for developers building streaming tool-calling chat apps._

### Why did my Ollama model return the same tool call twice?

Duplicate tool calls happened because the model referenced its previous tool call when results were passed back in, and the old parser would interpret that reference as a second tool call. Ollama's new incremental parser implements prefix matching and better state management to avoid this, so a single intended tool call is now returned once instead of twice.

_Developers debugging flaky tool-calling behavior can track fixes like this on daily.dev._

### What context window size improves tool calling accuracy in Ollama?

A context window of 32k tokens or higher anecdotally improves both tool-calling performance and the quality of the tool call results in Ollama. This can be set via the num_ctx option in the API request options, though memory usage increases with a longer context window.

_daily.dev helps developers tuning LLM tool-calling configs stay on top of practical tips like this._

## Similar posts on daily.dev

- [Ollama for JavaScript Developers](https://daily.dev/posts/ollama-for-javascript-developers-m7eti7jpi) · SitePoint · 0 upvotes · 0 comments
- [How to Integrate Local LLMs With Ollama and Python – Real Python](https://daily.dev/posts/how-to-integrate-local-llms-with-ollama-and-python-real-python-akyr0sngy) · Real Python · 1 upvotes · 0 comments
- [LLM Basics: Ollama Function Calling](https://daily.dev/posts/llm-basics-ollama-function-calling-1dpxl1yku) · Planet Python · 1 upvotes · 0 comments
- [Tokensparsamkeit for coding assistants](https://daily.dev/posts/tokensparsamkeit-for-coding-assistants-f7i9ttrv5) · ITNEXT · 0 upvotes · 0 comments
- [New coding models & integrations · Ollama Blog](https://daily.dev/posts/new-coding-models-integrations-ollama-blog-onqkepkh1) · Hacker News · 30 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#mcp](https://daily.dev/tags/mcp), [#ollama](https://daily.dev/tags/ollama)

[View this post on daily.dev](https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Streaming responses with tool calling · Ollama Blog","url":"https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl"},"datePublished":"2026-08-23T12:20:50.166Z","dateModified":"2026-08-23T12:45:22.742Z","description":"Ollama now supports streaming responses combined with tool calling, letting chat applications stream tokens while also invoking tools in real time. A new...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/03fb1a10ef158f8986c9778334c2af42?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/03fb1a10ef158f8986c9778334c2af42?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Ollama","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ollama","logo":"https://media.daily.dev/image/upload/s--dRYYkBCj--/f_auto,q_auto/v1787487632/logos/ollama-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/ollama"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,mcp,ollama","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ollama","item":"https://daily.dev/sources/ollama"},{"@type":"ListItem","position":3,"name":"Streaming responses with tool calling · Ollama Blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/streaming-responses-with-tool-calling-ollama-blog-c49wmqmsl#faq","mainEntity":[{"@type":"Question","name":"Does Ollama support streaming responses together with tool calling?","acceptedAnswer":{"@type":"Answer","text":"Yes, Ollama now supports streaming chat responses while also calling tools in real time. A new incremental parser references each model's template to detect and separate tool call tokens from regular content, removing the previous requirement to wait for the full generation before parsing JSON to check for a tool call. daily.dev surfaces updates like this for developers building streaming tool-calling chat apps."}},{"@type":"Question","name":"Why did my Ollama model return the same tool call twice?","acceptedAnswer":{"@type":"Answer","text":"Duplicate tool calls happened because the model referenced its previous tool call when results were passed back in, and the old parser would interpret that reference as a second tool call. Ollama's new incremental parser implements prefix matching and better state management to avoid this, so a single intended tool call is now returned once instead of twice. Developers debugging flaky tool-calling behavior can track fixes like this on daily.dev."}},{"@type":"Question","name":"What context window size improves tool calling accuracy in Ollama?","acceptedAnswer":{"@type":"Answer","text":"A context window of 32k tokens or higher anecdotally improves both tool-calling performance and the quality of the tool call results in Ollama. This can be set via the num_ctx option in the API request options, though memory usage increases with a longer context window. daily.dev helps developers tuning LLM tool-calling configs stay on top of practical tips like this."}}]}
```

