{"_id":"@ai-path/tb-mcp","_rev":"2-fc38dfdbd8a3dc75fd63fbe3c5c4cf43","name":"@ai-path/tb-mcp","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@ai-path/tb-mcp","version":"0.2.0","license":"MIT","_id":"@ai-path/tb-mcp@0.2.0","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"homepage":"https://github.com/aipathjp/lattica#readme","bugs":{"url":"https://github.com/aipathjp/lattica/issues"},"dist":{"shasum":"3d36cd43b75c3e4e41e0965d56da8816d96616b1","tarball":"https://registry.npmjs.org/@ai-path/tb-mcp/-/tb-mcp-0.2.0.tgz","fileCount":9,"integrity":"sha512-p71F4Wa0tUBTqeAtS90uQHekyLD3k5UOWY/qHZcucG5wxmop0Lr+sVOgOSxm6qD7evPbQl/dCPoF3ONHyT/8rg==","signatures":[{"sig":"MEYCIQCz4T+AS9K7KQWmlFYuTv0qM1mgSeisLNB8XciTrMclMgIhAIPJh/ssSikq+vK2XcZJwi/9yqFtuUeXi63kueK2TjeB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56709},"main":"./dist/index.cjs","type":"module","_from":"file:ai-path-tb-mcp-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fsakurai","email":"f-sakurai@ai-path.jp"},"_resolved":"/private/var/folders/tf/0c43660d4k1dg4ssxq0n63ww0000gn/T/217fab908290a89fa21102b73603d810/ai-path-tb-mcp-0.2.0.tgz","_integrity":"sha512-p71F4Wa0tUBTqeAtS90uQHekyLD3k5UOWY/qHZcucG5wxmop0Lr+sVOgOSxm6qD7evPbQl/dCPoF3ONHyT/8rg==","repository":{"url":"git+https://github.com/aipathjp/lattica.git","type":"git","directory":"packages/mcp"},"_npmVersion":"10.9.3","description":"Expose a Taible grid to AI agents: a transport-agnostic tool registry (get_cell/set_cell/get_range/evaluate/define_name) with handler-validated inputs and a result-enveloped dispatcher.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"@ai-path/tb-formula":"0.2.0"},"publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tb-mcp_0.2.0_1783181306839_0.4591054923154305","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ai-path/tb-mcp","version":"0.3.0","description":"Expose a Taible grid to AI agents: a transport-agnostic tool registry (get_cell/set_cell/get_range/evaluate/define_name) with handler-validated inputs and a result-enveloped dispatcher.","license":"MIT","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"dependencies":{"@ai-path/tb-formula":"0.3.0"},"publishConfig":{"access":"public","provenance":false},"repository":{"type":"git","url":"git+https://github.com/aipathjp/lattica.git","directory":"packages/mcp"},"homepage":"https://github.com/aipathjp/lattica#readme","bugs":{"url":"https://github.com/aipathjp/lattica/issues"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_id":"@ai-path/tb-mcp@0.3.0","_integrity":"sha512-KtV6e4l5l2XtFEzldA3d6pnaSfTPCRfRfB1ca6X1FWszTMoBzWyoJnsbtRMlM6eACz54QFkD8sSYuHARHABKzA==","_resolved":"/private/var/folders/tf/0c43660d4k1dg4ssxq0n63ww0000gn/T/fad803ea4fd92ccfdb014c5b5a7d9889/ai-path-tb-mcp-0.3.0.tgz","_from":"file:ai-path-tb-mcp-0.3.0.tgz","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-KtV6e4l5l2XtFEzldA3d6pnaSfTPCRfRfB1ca6X1FWszTMoBzWyoJnsbtRMlM6eACz54QFkD8sSYuHARHABKzA==","shasum":"e118e9b33a4229c9d52322e06bb54d0736e59029","tarball":"https://registry.npmjs.org/@ai-path/tb-mcp/-/tb-mcp-0.3.0.tgz","fileCount":9,"unpackedSize":56709,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICNRlYNHp+xOyE2h1PW53m440AHG10yaPwhSdP7VfHHLAiEAp27J5B3j69xrAO11dPY6gr1gxyihE6L7rJJSB3TKJEA="}]},"_npmUser":{"name":"fsakurai","email":"f-sakurai@ai-path.jp"},"directories":{},"maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tb-mcp_0.3.0_1783188084667_0.23489613440182788"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-04T16:08:26.676Z","modified":"2026-07-04T18:01:24.930Z","0.2.0":"2026-07-04T16:08:26.983Z","0.3.0":"2026-07-04T18:01:24.802Z"},"bugs":{"url":"https://github.com/aipathjp/lattica/issues"},"license":"MIT","homepage":"https://github.com/aipathjp/lattica#readme","repository":{"type":"git","url":"git+https://github.com/aipathjp/lattica.git","directory":"packages/mcp"},"description":"Expose a Taible grid to AI agents: a transport-agnostic tool registry (get_cell/set_cell/get_range/evaluate/define_name) with handler-validated inputs and a result-enveloped dispatcher.","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"readme":"# @ai-path/tb-mcp\n\nExposes a Taible grid to AI agents as a transport-agnostic tool registry. Each\n`GridTool` bundles a stable name, a description, a JSON-schema input definition,\nand a synchronous handler over a `@ai-path/tb-formula` `SheetEngine` — the handlers\nknow nothing about MCP wire framing or networking. The `ToolDispatcher` wraps a\ntool list with name lookup and a uniform `{ ok, output | error }` result, so a\nthin MCP server (or any agent loop) can marshal calls without bespoke glue.\n\n## Install\n\n```sh\npnpm add @ai-path/tb-mcp\n```\n\n## API overview\n\n### createGridTools + ToolDispatcher\n\n`createGridTools(engine)` returns the standard tool set bound to one engine:\n`get_cell`, `set_cell`, `get_range`, `evaluate`, and `define_name`. Feed it to a\n`ToolDispatcher` to list and call tools safely.\n\n```ts\nimport { SheetEngine } from '@ai-path/tb-formula';\nimport { createGridTools, ToolDispatcher } from '@ai-path/tb-mcp';\n\nconst engine = new SheetEngine();\nconst dispatcher = new ToolDispatcher(createGridTools(engine));\n\ndispatcher.list();                 // [{ name, description, inputSchema }, …]\ndispatcher.has('set_cell');        // true\n```\n\n### Calling tools\n\n`call` never throws: a bad input or unknown tool comes back as\n`{ ok: false, error }`, success as `{ ok: true, output }`.\n\n```ts\ndispatcher.call('set_cell', { row: 0, col: 0, content: 42 });\ndispatcher.call('set_cell', { row: 1, col: 0, content: '=A1*2' });\n\nconst read = dispatcher.call('get_cell', { row: 1, col: 0 });\n// { ok: true, output: { value: '84' } }\n\ndispatcher.call('evaluate', { formula: 'SUM(A1:A2)' });\ndispatcher.call('get_range', { startRow: 0, startCol: 0, endRow: 1, endCol: 0 });\n\nconst bad = dispatcher.call('get_cell', {});\n// { ok: false, error: '\"row\" must be a non-negative integer' }\n```\n\n### Constants & types\n\n- `MAX_RANGE_CELLS` — upper bound a single `get_range` may materialize.\n- `formatValue` — formats any cell value (numbers, booleans, `null`, `FormulaError`) to its display string.\n- `GridTool`, `ToolCallResult` — the tool and result shapes.\n","readmeFilename":"README.md"}