You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createServerFnTool mentioned in README does not exist in the package #170
The README at line 82 references a function called createServerFnTool from @tanstack/ai-react:
import { createServerFnTool } from '@tanstack/ai-react'
// Define once, get AI tool AND server function (TanStack Start only)
const getProducts = createServerFnTool({
name: 'getProducts',
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => db.products.search(query),
})
// Use in AI chat
chat({ tools: [getProducts.server] })
// Call directly from components (no API endpoint needed!)
const products = await getProducts.serverFn({ query: 'laptop' })
However, this function does not appear to exist in the codebase. I searched through the GitHub repository and could not find any implementation of createServerFnTool.
Questions
Is createServerFnTool planned but not yet implemented?
If it's not available, what is the recommended approach for sharing code between AI tools and TanStack Start server functions?
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Cursor
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.
changed the title [-]createServerFnTool does not exist in any package[/-][+]createServerFnTool mentioned in README does not exist in the package[/+]on Dec 22, 2025
Thank you, this was left as an artifact by accident from our experimentation with start specific abstractions (not saying this won't come in the future though) but this doesn't exist yet
Activity
coderabbitai commentedon Dec 22, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Related PRs
TanStack/router#5513 - fix: no invalidation for server functions in dev [merged]
#141 - Add TanStack Start server code example for chat API [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
[-]createServerFnTool does not exist in any package[/-][+]createServerFnTool mentioned in README does not exist in the package[/+]AlemTuzlak commentedon Dec 26, 2025
Thank you, this was left as an artifact by accident from our experimentation with start specific abstractions (not saying this won't come in the future though) but this doesn't exist yet