v1.3.0
Breaking changes
- Removed the LangChain wrapper.
createSchemaToolsno longer exists. - The
dbml-metaquery/toolssubpath no longer depends on@langchain/core.
What's new
schemaToolDefinitions— static array of{ name, description, schema, handler }exposed fromdbml-metaquery/tools. NoDbmlGraphinstance required, so you can introspect tool metadata for docs, type generation, or adapting to any agent framework.bindSchemaTools(graph)— returnsBoundSchemaTool[]with the graph closed over viainvoke(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/coreentirely. zodis now an optional peer dependency, so installing the CLI globally won't pull it in. It's only required when you importdbml-metaquery/tools.zodis externalized from the bundle.dist/tools.jsdropped 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 },
),
)