{"_id":"@data360/tool-types","_rev":"5-bf8323b7b4f8e1cd5dc0930396f1de78","name":"@data360/tool-types","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@data360/tool-types","version":"0.0.1","keywords":["data360","mcp","world-bank"],"license":"MIT","_id":"@data360/tool-types@0.0.1","maintainers":[{"name":"avsolatorio","email":"avsolatorio@gmail.com"}],"homepage":"https://github.com/worldbank/data360-mcp#readme","bugs":{"url":"https://github.com/worldbank/data360-mcp/issues"},"dist":{"shasum":"599bc628bf4cc0c51fa369e4c13c2b3720acaf1b","tarball":"https://registry.npmjs.org/@data360/tool-types/-/tool-types-0.0.1.tgz","fileCount":15,"integrity":"sha512-kdFmq4p4t+XWOq4X6mZSKJRWHPbHiZ4m569BjVQcBtDeRRQWGBGORGhQYp527YOM6E1FLsJNqY9Ao2F6W3QW7w==","signatures":[{"sig":"MEQCIBb5fWrm2pFRalmUpwu7RN4JU6v2YAstiLOaaxh7njUTAiBRaKRcmszz5eqeEPND3CS14fEQ08iagYvY549/h4rqwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8474},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"83b89fb58bff9cba0859892cd2f48b9134874c47","scripts":{"test":"vitest run","build":"tsc"},"_npmUser":{"name":"avsolatorio","email":"avsolatorio@gmail.com"},"repository":{"url":"git+https://github.com/worldbank/data360-mcp.git","type":"git"},"_npmVersion":"11.12.1","description":"TypeScript types and runtime guards for Data360 MCP tool JSON payloads.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tool-types_0.0.1_1776559794457_0.4113941307451723","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@data360/tool-types","version":"0.0.3","keywords":["data360","mcp","world-bank"],"license":"MIT","_id":"@data360/tool-types@0.0.3","maintainers":[{"name":"avsolatorio","email":"avsolatorio@gmail.com"},{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"}],"homepage":"https://github.com/worldbank/data360-mcp#readme","bugs":{"url":"https://github.com/worldbank/data360-mcp/issues"},"dist":{"shasum":"801876342bcfd5b616bf760249b072dc172ee44a","tarball":"https://registry.npmjs.org/@data360/tool-types/-/tool-types-0.0.3.tgz","fileCount":15,"integrity":"sha512-rijot4OP+TL8qzZT4tukX+DHy2dvaKvYFMhWSACkQVqyrJyuF9e/7O6DmVkpYBbKp0D+KEgaBTGn49LixyBW2A==","signatures":[{"sig":"MEQCIGWSGFAN19CyAEumWzp9pEQTjuhVXNQjGLau9R6cMXEfAiBT8tsdgxHbG8Ib97OdVLeZor4A5mPT/9NKXK6Al5UBZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149796},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3056e25c5ed4b2dabf002722fb7d6a343776641e","scripts":{"test":"vitest run","build":"tsc"},"_npmUser":{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"},"repository":{"url":"git+https://github.com/worldbank/data360-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"TypeScript types and runtime guards for Data360 MCP tool JSON payloads.","directories":{},"_nodeVersion":"23.9.0","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tool-types_0.0.3_1777015724127_0.7398949587926813","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@data360/tool-types","version":"0.0.4","keywords":["data360","mcp","world-bank"],"license":"MIT","_id":"@data360/tool-types@0.0.4","maintainers":[{"name":"avsolatorio","email":"avsolatorio@gmail.com"},{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"}],"homepage":"https://github.com/worldbank/data360-mcp#readme","bugs":{"url":"https://github.com/worldbank/data360-mcp/issues"},"dist":{"shasum":"fac1ee114bef3ef0d13e0e09c30f0b7213390a35","tarball":"https://registry.npmjs.org/@data360/tool-types/-/tool-types-0.0.4.tgz","fileCount":21,"integrity":"sha512-/wZwQh5qDiu+vQQF6ScBKH+FFf0wI24XT3oeidKoDx9OugNrRcf3Axrt87hmwFu2f++CmsOKQZ4kzlTa8zDzeA==","signatures":[{"sig":"MEQCIDmzCG9hUxYhEp4jD/OthILGtYi5+/XoecYjY8k6t/NbAiAheZEUnZ0gzieijGkmcqm8NNJiQm1zzlIWE5zjhgz96A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157230},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7e594bcd9a6a32cf949ed417695ab59d16e276ae","scripts":{"test":"vitest run","build":"tsc"},"_npmUser":{"name":"avsolatorio","email":"avsolatorio@gmail.com"},"repository":{"url":"git+https://github.com/worldbank/data360-mcp.git","type":"git"},"_npmVersion":"11.12.1","description":"TypeScript types and runtime guards for Data360 MCP tool JSON payloads.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tool-types_0.0.4_1777353014443_0.7355884472124155","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@data360/tool-types","version":"0.0.5","description":"TypeScript types and runtime guards for Data360 MCP tool JSON payloads.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","test":"vitest run"},"dependencies":{"zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.5.0","vitest":"^2.1.0"},"keywords":["data360","mcp","world-bank"],"license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/worldbank/data360-mcp.git"},"_id":"@data360/tool-types@0.0.5","gitHead":"1dda9d1235e58d8f7cf57ed836a5b9fc0e2327ff","bugs":{"url":"https://github.com/worldbank/data360-mcp/issues"},"homepage":"https://github.com/worldbank/data360-mcp#readme","_nodeVersion":"23.9.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-TvhfiZqpxzbG2r3wCkaCD7rv/EWNQyj1gEiSowDgQ2HrrWP+/q+Gg53rrWvfxvbeWdY6gj+6Udbr0qYG5oB3wA==","shasum":"a74e64f65925b131a5f10c6cb56b26818c63cecd","tarball":"https://registry.npmjs.org/@data360/tool-types/-/tool-types-0.0.5.tgz","fileCount":18,"unpackedSize":156732,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAFFvwn+BRS22sZgJ2txiLUa6Ya3xVx7Qxue8QPPCBjMAiA3ixC+wSrbXdngygFA9U3QMTXjwQH6UXxrp08ImA+Hqg=="}]},"_npmUser":{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"},"directories":{},"maintainers":[{"name":"avsolatorio","email":"avsolatorio@gmail.com"},{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tool-types_0.0.5_1779909677273_0.12339077686045408"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-19T00:49:54.389Z","modified":"2026-05-27T19:21:17.617Z","0.0.1":"2026-04-19T00:49:54.599Z","0.0.3":"2026-04-24T07:28:44.260Z","0.0.4":"2026-04-28T05:10:14.569Z","0.0.5":"2026-05-27T19:21:17.466Z"},"bugs":{"url":"https://github.com/worldbank/data360-mcp/issues"},"license":"MIT","homepage":"https://github.com/worldbank/data360-mcp#readme","keywords":["data360","mcp","world-bank"],"repository":{"type":"git","url":"git+https://github.com/worldbank/data360-mcp.git"},"description":"TypeScript types and runtime guards for Data360 MCP tool JSON payloads.","maintainers":[{"name":"avsolatorio","email":"avsolatorio@gmail.com"},{"name":"rafamacalaba","email":"rafael.macalaba@yahoo.com"}],"readme":"# @data360/tool-types\n\nTypeScript types and runtime guards for JSON payloads returned by [data360-mcp](https://github.com/worldbank/data360-mcp) tools.\n\n## Install\n\n```bash\nnpm install @data360/tool-types\n```\n\n## Usage\n\n```ts\nimport {\n  TOOL_CONTRACT_VERSION,\n  parseData360VizToolResult,\n  isData360VizToolSuccess,\n} from \"@data360/tool-types\";\n\nconst parsed = parseData360VizToolResult(mcpToolContent);\nif (parsed.success && isData360VizToolSuccess(parsed.data)) {\n  await fetch(parsed.data.url);\n}\n```\n\n## Compatibility\n\n| `@data360/tool-types` | Tool contract | Typical `data360-mcp` |\n|----------------------|---------------|------------------------|\n| `1.0.0` | `1.0.0` | `>= 0.1.2` (see repo release notes) |\n\nThe **tool contract version** is the semver in `schemas/tool-contract-version.json` (mirrored under `contracts/` and `src/data360/tool_contract_version.json` in the server repo). Bump it when MCP tool JSON shapes change in a **breaking** way for consumers; release `@data360/tool-types` and UI packages together.\n\nUse `TOOL_CONTRACT_VERSION` and `data360.get_tool_contract_version()` (Python) to assert alignment in your app if needed.\n\n## Exports\n\n- **`TOOL_CONTRACT_VERSION`** — string semver for the shared contract.\n- **`parseData360VizToolResult(unknown)`** — Zod `safeParse` for `data360_get_viz_spec` / `data360_get_multi_indicator_viz_spec` results (`url`, `error`, optional `warning`, `strategy`, `reason`).\n- **`isData360VizToolSuccess`** — type guard for successful viz payloads.\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n","readmeFilename":"README.md"}