{"_id":"@emblemvault/primitives-mcp-schemas","name":"@emblemvault/primitives-mcp-schemas","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@emblemvault/primitives-mcp-schemas","version":"0.1.0","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"zod":"^3.23.0","zod-to-json-schema":"^3.23.0","@emblemvault/primitives-shared":"0.2.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.4.0","vitest":"^1.6.0"},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run --passWithNoTests","export-json":"node dist/export.js"},"description":"Single source of truth for the `emblem_*` MCP tool surface defined in `06-integration-contracts.md` §3.","_id":"@emblemvault/primitives-mcp-schemas@0.1.0","_integrity":"sha512-eG9DDIC4kE7lCkjRpQxAVTkGilceZnIlL8HVk3Ivl24IPdDZ9J9C3UaS7SHmBced8OAGZN5wTmFVEewwKys1Aw==","_resolved":"/private/var/folders/83/gxdpnp3x4pl012kc_svrprhc0000gn/T/9d232887530c27aa07b1523de27fb370/emblemvault-primitives-mcp-schemas-0.1.0.tgz","_from":"file:emblemvault-primitives-mcp-schemas-0.1.0.tgz","_nodeVersion":"24.13.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-eG9DDIC4kE7lCkjRpQxAVTkGilceZnIlL8HVk3Ivl24IPdDZ9J9C3UaS7SHmBced8OAGZN5wTmFVEewwKys1Aw==","shasum":"eac819aa112edf67a5a63115abeba82105f6f5d3","tarball":"https://registry.npmjs.org/@emblemvault/primitives-mcp-schemas/-/primitives-mcp-schemas-0.1.0.tgz","fileCount":77,"unpackedSize":356120,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDj2bEwwHYOxHE83Y3uTC5ley8t32pmq/+tgqyCb+6dbwIgSIZPJ4/QX6eyzAw2dIMaDbKnp8ZBShe+hLkZ3QLfoIc="}]},"_npmUser":{"name":"genecyber","email":"genecyber@gmail.com"},"directories":{},"maintainers":[{"name":"genecyber","email":"genecyber@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/primitives-mcp-schemas_0.1.0_1777818738095_0.04875681070709148"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T14:32:18.011Z","0.1.0":"2026-05-03T14:32:18.224Z","modified":"2026-05-03T14:32:18.415Z"},"maintainers":[{"name":"genecyber","email":"genecyber@gmail.com"}],"description":"Single source of truth for the `emblem_*` MCP tool surface defined in `06-integration-contracts.md` §3.","readme":"# @emblemvault/primitives-mcp-schemas\n\nSingle source of truth for the `emblem_*` MCP tool surface defined in `06-integration-contracts.md` §3.\n\nEvery tool has a Zod schema for both its input and output. The package exports:\n\n- **The registry** (`TOOLS`, `TOOLS_BY_NAME`, `TOOL_NAMES`) — what nanoclaw skills iterate over to register MCP tools, and what the vault-proxy uses to gate read-only vs. signing calls.\n- **Per-primitive schema modules** (`Split`, `Sell`, `Gate`, `Receipt`, `Stake`, `Launch`, `Meter`, `AgentPay`, `Treasury`, `VaultProxy`, `Common`) — for callers that want to validate one schema without pulling the whole registry.\n- **JSON-Schema export** (`buildExport()` and the `export-json` script) — produces a static JSON file that external consumers (docs sites, codegen, third-party agents) point at.\n\n## Quick start\n\n```ts\nimport { TOOLS, TOOLS_BY_NAME } from '@emblemvault/primitives-mcp-schemas';\n\n// Validate an input before forwarding to an MCP server.\nconst tool = TOOLS_BY_NAME['emblem_split_simulate'];\nconst result = tool.input.safeParse({ configId: 'cfg-1', amount: 100, asset: 'USDC' });\nif (!result.success) throw result.error;\n```\n\n## Generate the static JSON\n\n```bash\npnpm --filter @emblemvault/primitives-mcp-schemas export-json\n```\n\nWrites `schemas-out/schemas.json` — JSON Schema 2020-12 with one entry per tool. Gitignored; regenerate as needed.\n\n## Adding a new tool\n\n1. Define its Zod schemas in the appropriate primitive file (e.g., `src/split.ts`).\n2. Add an entry to `TOOLS` in `src/registry.ts` with `name`, `primitive`, `readOnly`, `signing`, `description`, `input`, `output`.\n3. Bump the per-primitive count in `registry.test.ts` so the count assertion passes.\n4. Run `pnpm test`.\n\nThe tests lock the per-primitive counts so a tool deletion can't sneak through silently.\n","readmeFilename":"README.md","_rev":"1-002e69e575db001915328509895a9d18"}