Skip to content

v1.3.0

Choose a tag to compare

@ada-lovecraft ada-lovecraft released this 15 May 22:07
· 2 commits to main since this release

Breaking changes

  • Removed the LangChain wrapper. createSchemaTools no longer exists.
  • The dbml-metaquery/tools subpath no longer depends on @langchain/core.

What's new

  • schemaToolDefinitions — static array of { name, description, schema, handler } exposed from dbml-metaquery/tools. No DbmlGraph instance required, so you can introspect tool metadata for docs, type generation, or adapting to any agent framework.
  • bindSchemaTools(graph) — returns BoundSchemaTool[] with the graph closed over via invoke(input). Handlers return raw objects rather than JSON strings; consumers stringify if needed.
  • Schemas remain Zod-based and are compatible with LangChain, Vercel AI SDK, MCP, and other Zod-aware frameworks — just wrap them yourself.

Dependency / packaging changes

  • Dropped @langchain/core entirely.
  • zod is now an optional peer dependency, so installing the CLI globally won't pull it in. It's only required when you import dbml-metaquery/tools.
  • zod is externalized from the bundle. dist/tools.js dropped from ~1.25 MB to ~5 KB.

Migration

If you were using createSchemaTools(graph) to get LangChain tools, wrap the bound definitions yourself:

import { tool } from "@langchain/core/tools"
import { bindSchemaTools } from "dbml-metaquery/tools"

const tools = bindSchemaTools(graph).map((def) =>
  tool(
    async (input) => JSON.stringify(def.invoke(input)),
    { name: def.name, description: def.description, schema: def.schema },
  ),
)