[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[AI SDK](/c/ai-sdk/62)

# Can I stream structured tool's ouput?

916 views · 4 likes · 4 posts


Ziadoonalobaidi (@ziadoonalobaidi) · 2025-05-30 · ♥ 1

Hello all,

**Problem :** 
Before i was using StreamObject to stream tasks, but now my app is more complicated so i needed tools so i switched to streamText() which works well, the only thing i miss the object streaming feature, the tools inside streamText generates well an object + stream the text after the tool usage , but not streaming the tool structured output. 

**Question** : is it possible please to stream the tool structured output instead of waiting long time for generating it? thanks.

**streamText code :** 

```
        const result = streamText({
            model: mistral('mistral-small-latest'),
            maxSteps: 3,
            toolCallStreaming: true,
            system: getMeetingModalSystemPrompt(context, promptRouter.result),
            messages,
            tools: {
                proposeTodoCreation,
                meetingCreation,
                noteCreation,
            },
        });
```
**Tool code :**
 
```
export const noteCreation = tool({
    description: 'Use this tool when the user ask to generate a note or sumamry of meeting',

    parameters: z.object({
        note: z
            .object({
                subjects: z.string().describe('main Subjects disscused during the meeting, be detailed'),
                futureActions: z.string().describe('planned tasks for future, be detailed'),
            })
            .describe('create a detailed meeting summary'),
    }),

    execute: async ({ note }) => note,
});
```

thank you !


Nico Albanese (@nicoalbanese) · 2025-05-30 · ♥ 2

You can’t stream tool results but you can stream arguments with partial tool calls..

https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-tool-usage#tool-call-streaming


Ziadoonalobaidi (@ziadoonalobaidi) · 2025-05-30

hello Nico, yes i tried but it didnt work neither , but thanks for your answer !


Morsedecoders (@morsedecoders-9261) · 2025-06-05 · ♥ 1

Currently, streamText() doesn’t support streaming structured tool outputs only the tool call and the final text. Streaming the structured output isn’t implemented yet, but would definitely be useful. Hope it’s added soon!