@paradoc/tanstack-ai
v0.1.1
Published
TanStack AI adapter for Paradoc tools — wraps @paradoc/ai-tools with toolDefinition().server()
Maintainers
Readme
Paradoc is documents as code. It lets developers and AI agents define, validate, and render business documents using typed, composable schemas. This eliminates template drift, broken mappings, and brittle glue code — while giving AI systems a reliable document layer they can safely read, reason over, and generate against in production workflows.
Package overview
TanStack AI adapter for Paradoc tools. Wraps @paradoc/ai-tools with toolDefinition().server() for use with TanStack AI's chat, agent, and server handler APIs.
- 5 tools - validateArtifact, fill, render, getRegistry, getArtifact
- Server-side execution - Tools run on the server via
.server()pattern - Typed schemas - Zod v4 input schemas with full type inference
- Peer dependency - Requires
@tanstack/ai
Installation
npm install @paradoc/tanstack-ai @tanstack/ai zodUsage
import { paradocTools } from "@paradoc/tanstack-ai";
const tools = paradocTools({
defaultRegistryUrl: "https://public.paradoc.dev",
});
// Use with TanStack AI's chat, agent, or server handlerConfiguration
const tools = paradocTools({
defaultRegistryUrl: "https://public.paradoc.dev",
proxyTextRenderer: {
url: "https://your-documents-service.example.com",
apiKey: "your-api-key",
},
fetch: customFetchWithAuth,
});Tools provided
| Tool | Description |
|------|-------------|
| validateArtifact | Validates an Paradoc artifact against its schema |
| fill | Fills an Paradoc artifact with data and validates |
| render | Renders an Paradoc artifact to PDF, markdown, or DOCX |
| getRegistry | Fetches registry.json from a URL, returns available artifacts |
| getArtifact | Fetches artifact JSON from a registry by name |
Changelog
View the Changelog for updates.
Related packages
@paradoc/ai-tools- Core tool protocol (framework-neutral)@paradoc/ai-sdk- Vercel AI SDK adapter@paradoc/sdk- Paradoc framework SDK
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.
License
This project is licensed under the MIT license.
See LICENSE for more information.
