Skip to content

Releases: bellaaaaxu/canada-law

v0.2.3 · say so when the official site cannot be reached

Choose a tag to compare

@bellaaaaxu bellaaaaxu released this 29 Sep 08:54

When the official website cannot be reached, the tools now say so plainly, and answers give the "current to" date only as the tool returned it.

  • A claude.ai test (2026-09-29) told a user that the Employment Standards Act was "current to 2025-02-11, out of date". The official page said current to 2026-09-22, and neither that page nor its table of legislative changes carries any 2025 date. The most likely cause: the code-execution sandbox could not reach BC Laws, the script printed only "fetch failed", and the answer was then put together from another source.
  • A network failure (no DNS, no route, refused, timed out, TLS) now comes back as a clear message: which website could not be reached, that the answer should say the official text could not be fetched here and give the official website, and not to fill in the wording, a "current to" date or a version from another website or from memory. Nothing is cached, so the next lookup tries again.
  • Two new answer rules, in the skill and in the answer_rules returned with the text: give current_to exactly as the tool returned it, and never state a date, version or up-to-date status a tool did not return; when the website cannot be reached, say so rather than downloading the whole act page some other way.
  • Nothing else changed. If an AI app's sandbox blocks the internet (claude.ai code execution may allow package managers only), these tools cannot fetch the text there; the answer should now say that instead of guessing.

Install, or update an earlier install (needs Node.js 20 or newer; shows what it will change and asks first):

npx https://github.com/bellaaaaxu/canada-law/releases/download/v0.2.3/canada-law-0.2.3.tgz install

Claude Desktop without Node.js: download canada-law-0.2.3.mcpb below and double-click it.

Whether and how an AI uses these tools is up to the app and the model. This is general legal information, not legal advice. The statute text is not an official version: see the README for the King's Printer Licence statement and the Reproduction of Federal Law Order.


连不上官网时,工具现在会直说;回答里的「现行至」日期只照工具返回的写。起因:2026-09-29 在 claude.ai 里测试,回答告诉用户《就业标准法》「现行至 2025-02-11、已过时」,而官网写的是现行至 2026-09-22,页面和修订记录上都没有任何 2025 年的日期。最可能的经过是 claude.ai 的代码沙箱连不上 BC Laws,脚本只报了一句「fetch failed」,模型就从别处拼了答案。现在断网时会明确告诉 AI:哪个网站连不上、要跟用户说这里取不到官方原文并给出官网、不许从别的网站或记忆补原文、日期或版本。回答规则里也加了两条:「现行至」日期只报工具给的;连不上就直说,不绕道去下整页。其他没有改动。安装和更新都用上面同一行命令;Claude 桌面版下载 canada-law-0.2.3.mcpb 双击即可。这是一般性的法律信息,不是法律意见。

v0.2.2 · answer rules come back with the text

Choose a tag to compare

@bellaaaaxu bellaaaaxu released this 27 Sep 10:13

The answer rules now come back with the official text.

  • Claude Desktop reportedly does not pass an MCP server's instructions to the model (anthropics/claude-ai-mcp#93), so Desktop users got the tools but not the answer format and rules. get_section, search_law and get_toc now return them as answer_rules, word for word the same as the instructions, and their descriptions say to follow them.
  • New rule: when a question is about something that already happened (for example holiday pay from last year), the answer says it is quoting the current text and that the law at that time may have been different.
  • A first comparison test (Claude Opus 5.5, ten new questions, four groups) is in docs/acceptance/2026-09-27-对照测试-结果.md. A group without the server instructions, using only the rules returned with the text, answered in the set format in all ten answers. Core answers were close across groups; wrong side details (mostly deadlines) were 6 answering from memory, 3 with web search, 0 with this server. One small round, read the caveats there.

Install, or update an earlier install (needs Node.js 20 or newer; shows what it will change and asks first):

npx https://github.com/bellaaaaxu/canada-law/releases/download/v0.2.2/canada-law-0.2.2.tgz install

Claude Desktop without Node.js: download canada-law-0.2.2.mcpb below and double-click it.

Whether and how an AI uses these tools is up to the app and the model: Claude Desktop sometimes answers from memory without looking anything up. To make sure it checks, ask it to "check the official text with Canada Law". This is general legal information, not legal advice. The statute text is not an official version: see the README for the King's Printer Licence statement and the Reproduction of Federal Law Order.


回答规则现在随官方原文一起返回。据公开问题记录,Claude 桌面版不把服务器的使用说明交给模型,所以读条文、搜索、看目录这三个工具的结果里现在都附上回答格式和规则。新增一条规则:问的是过去的事,要说明给的是现行法律、当时的规定可能不同。第一轮对照测试(Opus 5.5,10 题,4 组)的结果见上面链接:只靠结果里附带的规则,10 份回答都按格式答;核心答案各组差不多,顺带说错的细节(大多是期限)凭记忆 6 处、网页搜索 3 处、用本工具 0 处。样本小,局限写在结果里。安装和更新都用上面同一行命令;Claude 桌面版下载 canada-law-0.2.2.mcpb 双击即可。在桌面版里想确保它查原文,就在问题里加一句「用 Canada Law 查官方原文」。这是一般性的法律信息,不是法律意见。

v0.2.1 · cache fix

Choose a tag to compare

@bellaaaaxu bellaaaaxu released this 27 Sep 07:56

One fix. If the operating system's temp cleanup deleted the cache folder while the server was running (for example with Claude Desktop left open for days), every later lookup failed with an ENOENT error until the app was restarted. Caching is now best effort: the folder is made again when needed, and a lookup never fails because its copy could not be cached. Nothing else changed.

Install, or update an earlier install (needs Node.js 20 or newer; shows what it will change and asks first):

npx https://github.com/bellaaaaxu/canada-law/releases/download/v0.2.1/canada-law-0.2.1.tgz install

Claude Desktop without Node.js: download canada-law-0.2.1.mcpb below and double-click it.

This is general legal information, not legal advice. The statute text is not an official version: see the README for the King's Printer Licence statement and the Reproduction of Federal Law Order.


修了一个问题:程序一直开着的时候(比如 Claude 桌面版几天不关),如果系统清理临时文件把缓存文件夹删了,之后每次查询都会报错(ENOENT),要重启才能恢复。现在缓存改成「尽力而为」:需要时重新建文件夹,缓存写不进去也照样给出查到的内容。其他没有变化。安装和更新都用上面同一行命令;Claude 桌面版下载 canada-law-0.2.1.mcpb 双击即可。这是一般性的法律信息,不是法律意见。

v0.2.0 · BC and federal employment law

Choose a tag to compare

@bellaaaaxu bellaaaaxu released this 27 Sep 07:07

Federal law is in: the Canada Labour Code and the regulations made under it, for federally regulated workplaces (banks, airlines, telecommunications, interprovincial transport and similar). Answers still come from the current official text, now on BC Laws and the Justice Laws Website, with the act, section number, a link to the section and the official "current to" date. English and Chinese.

Install, or update an earlier install (needs Node.js 20 or newer; shows what it will change and asks first):

npx https://github.com/bellaaaaxu/canada-law/releases/download/v0.2.0/canada-law-0.2.0.tgz install

Claude Desktop without Node.js: download canada-law-0.2.0.mcpb below and double-click it.

What is new:

  • Federal search covers the Canada Labour Code and the 32 regulations the official list puts under it. Any other federal act or regulation can be read section by section (find_act, get_toc and get_section with jurisdiction federal)
  • search_law with jurisdiction all searches BC and federal law together
  • Amendments that are not in force yet are never given as current law; a section that one would change says so
  • Glossary: 52 federal entries under the same Chinese and everyday-English words (BC says "statutory holiday", federal law "general holiday"), each checked against the official text; 104 entries in all
  • The skill's script: search <bc|federal|all> … and find <bc|federal> …; section and toc tell BC from federal by the act_id

Not covered yet: federal benefits law, such as Employment Insurance (EI) and the Canada Pension Plan (CPP). This is general legal information, not legal advice. The statute text is not an official version: see the README for the King's Printer Licence statement and the Reproduction of Federal Law Order.


第二个版本:加入联邦法律——《加拿大劳动法典》和它名下的条例,适用于银行、航空、电信、跨省运输等联邦监管行业。回答照旧依据现行的官方原文(BC Laws 和联邦 Justice Laws 网站),写出法律名称、条号、原文链接和官方「现行至」日期。尚未生效的修订不会被当成现行法。术语表新增 52 条联邦词条。失业保险(EI)、加拿大退休金(CPP)等联邦福利法还没有收录。安装和更新都用上面同一行命令,详见 中文说明。这是一般性的法律信息,不是法律意见。

v0.1.0 · BC employment law

Choose a tag to compare

@bellaaaaxu bellaaaaxu released this 27 Sep 04:15

First release: British Columbia employment law for your AI assistant, answered from the current official text on BC Laws, with the act, section number, a link to the section and the official "current to" date. English and Chinese.

Install (needs Node.js 20 or newer; shows what it will change and asks first):

npx https://github.com/bellaaaaxu/canada-law/releases/download/v0.1.0/canada-law-0.1.0.tgz install

Claude Desktop without Node.js: download canada-law-0.1.0.mcpb below and double-click it.

What is in it:

  • An Agent Skill (canada-employment-law) and an MCP server with five tools: find_act, get_toc, get_section, search_law, map_term
  • A glossary of 52 everyday words in Chinese and plain English (加班费, "stat holiday", "severance"…) mapped to the words the statute uses, each checked against the official text
  • An installer for 14 AI tools (Claude Code, Claude Desktop, OpenAI Codex, VS Code / GitHub Copilot, Cursor, Gemini CLI and more), with preview, backups and uninstall

BC law only for now; federal law (Canada Labour Code) is next. This is general legal information, not legal advice, and the statute text is not an official version: see the README for the King's Printer Licence statement.


第一个版本:让你的 AI 助手查 BC 劳动法,回答依据 BC Laws 上现行的官方原文,写出法律名称、条号、原文链接和官方「现行至」日期。中英双语。安装方法见上方或 中文说明。目前只有 BC 省法律,联邦法律下一版加入。这是一般性的法律信息,不是法律意见。