-
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
TanStack AI version
v0.2.2
Framework/Library version
v19.2.3
Describe the bug and the steps to reproduce it
Tanstack ai docs mention that tool definition is fully typesafe.
But the client function shows input as unknown.
Minimal repro:
import { toolDefinition } from '@tanstack/ai'
import z from 'zod'
export const saveToLocalStorageDef = toolDefinition({
name: 'save_to_local_storage',
description: 'Save data to browser local storage',
inputSchema: z.object({
key: z.string().describe('Storage key'),
value: z.string().describe('Value to store'),
}),
outputSchema: z.object({
saved: z.boolean(),
}),
})
const saveToLocalStorage = saveToLocalStorageDef.client((input) => {
localStorage.setItem(input.key, input.value)
return { saved: true }
})
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
None
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
satvikreddy and MattisAbrahamsson
Metadata
Metadata
Assignees
Labels
No labels