Skip to content

feat: add @spec2tools/sdk-tanstack package for generating TanStack AI tools#13

Merged
CahidArda merged 11 commits intomainfrom
feat/12-tanstack-tools
Mar 12, 2026
Merged

feat: add @spec2tools/sdk-tanstack package for generating TanStack AI tools#13
CahidArda merged 11 commits intomainfrom
feat/12-tanstack-tools

Conversation

@CahidArda
Copy link
Copy Markdown
Owner

@CahidArda CahidArda commented Mar 12, 2026

Creates a new package that converts OpenAPI specifications into TanStack AI ServerTool instances using toolDefinition().server() from @tanstack/ai. Mirrors the @spec2tools/sdk pattern but targets @tanstack/ai's chat() API.

Fixes #12

Upstash Box and others added 11 commits March 12, 2026 22:33
… tools

Creates a new package that converts OpenAPI specifications into TanStack AI
ServerTool instances using toolDefinition().server() from @tanstack/ai.
Mirrors the @spec2tools/sdk pattern but targets @tanstack/ai's chat() API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add README.md with usage examples for createTools and convertToolsToCodeMode
- Add LICENSE (MIT)
- Add convertToolsToCodeMode function that converts ServerTool[] into 2
  code-mode tools (search + execute) using Monty Python interpreter,
  mirroring the same pattern as @spec2tools/sdk
- Add codeMode option to createTools
- Add @pydantic/monty as a dependency for code mode execution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add examples/* glob to pnpm-workspace.yaml so examples are
  workspace packages that resolve monorepo deps via workspace:*
- Add examples/sdk-tanstack-node: a minimal Node.js script that
  uses @spec2tools/sdk-tanstack + @tanstack/ai to answer prompts
  against a JSONPlaceholder OpenAPI spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… examples

- code-mode.ts: same OpenAPI spec but with codeMode: true (2 tools)
- convert-code-mode.ts: convertToolsToCodeMode with hand-written mock tools
- Update package.json with start:code-mode and start:convert scripts
- Update README to document all three examples

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename index.ts → example-basic.ts, code-mode.ts → example-code-mode.ts,
convert-code-mode.ts → example-convert-code-mode.ts. Update package.json
scripts and README accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move zod to peerDependencies with ^3.25.0 || ^4.0.0 in core, sdk, and
sdk-tanstack to let consumers choose the version. Update internal imports
to zod/v3 for compatibility. Fix excessively deep type instantiation in
stdio-mcp by double-casting mcpClient.tools() result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CahidArda CahidArda merged commit cc25602 into main Mar 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tanstack tools

1 participant