edition-mcp-server 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +95 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ async function apiPost(path, body) {
47
47
  // ── MCP Server ──────────────────────────────────────
48
48
  const server = new mcp_js_1.McpServer({
49
49
  name: "edition",
50
- version: "0.1.2",
50
+ version: "0.1.5",
51
51
  });
52
52
  // ── Tool: memory_store ──────────────────────────────
53
53
  server.tool("memory_store", "会話やイベントのエピソードを永続記憶に保存します。日本語の文脈(敬語レベル、主語省略、暗黙の了解)も構造化して保持します。auto_extract=trueにすると、テキストからファクト(主語→述語→目的語の三つ組)を自動抽出します。", {
@@ -380,9 +380,101 @@ server.tool("entertainment_list", "日本のエンタメ知識のトピック一
380
380
  }
381
381
  return { content: [{ type: "text", text }] };
382
382
  });
383
+ // ── Tool: daily_life_search ─────────────────────────
384
+ server.tool("daily_life_search", "日本の日常生活に関する知識を検索します。住所・郵便システム、ゴミ分別ルール、公共料金(電気・ガス・水道・NHK)、医療・健康保険制度。外国人が日本で生活するために必要な実用知識。", {
385
+ query: zod_1.z.string().describe("検索クエリ(例: 'ゴミの分別方法', '健康保険の加入', '引っ越しの手続き')"),
386
+ }, async ({ query }) => {
387
+ const result = await apiPost("/api/v1/daily-life/search", { query });
388
+ if (!result.results?.length) {
389
+ return { content: [{ type: "text", text: `❌ '${query}' に該当する日常生活情報が見つかりませんでした。` }] };
390
+ }
391
+ let text = `🏠 日常生活情報 (${result.total_matches}件ヒット):\n\n`;
392
+ for (const r of result.results) {
393
+ text += ` 📌 ${r.name_ja} (${r.name_en})\n ${r.summary}\n\n`;
394
+ }
395
+ return { content: [{ type: "text", text }] };
396
+ });
397
+ // ── Tool: daily_life_list ──────────────────────────
398
+ server.tool("daily_life_list", "日本の日常生活知識のトピック一覧を取得します。", {}, async () => {
399
+ const result = await apiGet("/api/v1/daily-life/list");
400
+ let text = `🏠 日常生活トピック一覧 (${result.total}件):\n\n`;
401
+ for (const t of result.topics) {
402
+ text += ` • ${t.name_ja} (${t.name_en})\n ${t.summary}\n\n`;
403
+ }
404
+ return { content: [{ type: "text", text }] };
405
+ });
406
+ // ── Tool: language_search ──────────────────────────
407
+ server.tool("language_search", "日本語の構造的知識を検索します。敬語体系(尊敬語・謙譲語・丁寧語)、助数詞(数え方)、名前・住所の構造パターン、ビジネス日本語(電話応対・クッション言葉・メールテンプレート)。", {
408
+ query: zod_1.z.string().describe("検索クエリ(例: '敬語の使い方', '助数詞の一覧', 'ビジネスメールの書き方')"),
409
+ }, async ({ query }) => {
410
+ const result = await apiPost("/api/v1/language/search", { query });
411
+ if (!result.results?.length) {
412
+ return { content: [{ type: "text", text: `❌ '${query}' に該当する日本語情報が見つかりませんでした。` }] };
413
+ }
414
+ let text = `🗾 日本語知識 (${result.total_matches}件ヒット):\n\n`;
415
+ for (const r of result.results) {
416
+ text += ` 📌 ${r.name_ja} (${r.name_en})\n ${r.summary}\n\n`;
417
+ }
418
+ return { content: [{ type: "text", text }] };
419
+ });
420
+ // ── Tool: language_list ────────────────────────────
421
+ server.tool("language_list", "日本語知識のトピック一覧を取得します。", {}, async () => {
422
+ const result = await apiGet("/api/v1/language/list");
423
+ let text = `🗾 日本語トピック一覧 (${result.total}件):\n\n`;
424
+ for (const t of result.topics) {
425
+ text += ` • ${t.name_ja} (${t.name_en})\n ${t.summary}\n\n`;
426
+ }
427
+ return { content: [{ type: "text", text }] };
428
+ });
429
+ // ── Tool: food_search ──────────────────────────────
430
+ server.tool("food_search", "日本の食文化に関する知識を検索します。食事マナー(箸のタブー・乾杯・割り勘)、料理分類(懐石・定食・ラーメン・郷土料理)、飲食店ガイド(食券機・居酒屋・回転寿司・おまかせ)、アレルギー・食制限(ハラル・ベジタリアン対応)。", {
431
+ query: zod_1.z.string().describe("検索クエリ(例: '箸のマナー', 'ハラル対応レストラン', '回転寿司の注文方法')"),
432
+ }, async ({ query }) => {
433
+ const result = await apiPost("/api/v1/food/search", { query });
434
+ if (!result.results?.length) {
435
+ return { content: [{ type: "text", text: `❌ '${query}' に該当する食文化情報が見つかりませんでした。` }] };
436
+ }
437
+ let text = `🍣 食文化情報 (${result.total_matches}件ヒット):\n\n`;
438
+ for (const r of result.results) {
439
+ text += ` 📌 ${r.name_ja} (${r.name_en})\n ${r.summary}\n\n`;
440
+ }
441
+ return { content: [{ type: "text", text }] };
442
+ });
443
+ // ── Tool: food_list ────────────────────────────────
444
+ server.tool("food_list", "日本の食文化知識のトピック一覧を取得します。", {}, async () => {
445
+ const result = await apiGet("/api/v1/food/list");
446
+ let text = `🍣 食文化トピック一覧 (${result.total}件):\n\n`;
447
+ for (const t of result.topics) {
448
+ text += ` • ${t.name_ja} (${t.name_en})\n ${t.summary}\n\n`;
449
+ }
450
+ return { content: [{ type: "text", text }] };
451
+ });
452
+ // ── Tool: disaster_search ──────────────────────────
453
+ server.tool("disaster_search", "日本の災害・安全に関する知識を検索します。地震(震度スケール・緊急地震速報・耐震基準)、台風・水害(警戒レベル・計画運休)、緊急連絡先(110/119/多言語対応)、防災準備(防災バッグ・ハザードマップ・避難所マナー)。", {
454
+ query: zod_1.z.string().describe("検索クエリ(例: '地震が来たらどうする', '緊急連絡先', '防災バッグの中身')"),
455
+ }, async ({ query }) => {
456
+ const result = await apiPost("/api/v1/disaster/search", { query });
457
+ if (!result.results?.length) {
458
+ return { content: [{ type: "text", text: `❌ '${query}' に該当する災害・安全情報が見つかりませんでした。` }] };
459
+ }
460
+ let text = `⚠️ 災害・安全情報 (${result.total_matches}件ヒット):\n\n`;
461
+ for (const r of result.results) {
462
+ text += ` 📌 ${r.name_ja} (${r.name_en})\n ${r.summary}\n\n`;
463
+ }
464
+ return { content: [{ type: "text", text }] };
465
+ });
466
+ // ── Tool: disaster_list ────────────────────────────
467
+ server.tool("disaster_list", "日本の災害・安全知識のトピック一覧を取得します。", {}, async () => {
468
+ const result = await apiGet("/api/v1/disaster/list");
469
+ let text = `⚠️ 災害・安全トピック一覧 (${result.total}件):\n\n`;
470
+ for (const t of result.topics) {
471
+ text += ` • ${t.name_ja} (${t.name_en})\n ${t.summary}\n\n`;
472
+ }
473
+ return { content: [{ type: "text", text }] };
474
+ });
383
475
  // ── Tool: search ────────────────────────────────────
384
- server.tool("search", "EDITION全ドメインを横断検索します。1回のリクエストで規制・プロトコル・カレンダー・地域・組織・進出手続き・旅行・エンタメの全8ドメインを同時検索。", {
385
- query: zod_1.z.string().describe("検索クエリ(例: '大阪で飲食店を開業', '推し活のマナー', '外国人のビザ取得')"),
476
+ server.tool("search", "EDITION全14ドメインを横断検索します。1回のリクエストで規制・プロトコル・カレンダー・地域・組織・進出手続き・旅行・エンタメ・日常生活・日本語・食文化・災害安全の全12ドメインを同時検索。", {
477
+ query: zod_1.z.string().describe("検索クエリ(例: '大阪で飲食店を開業', '地震の避難方法', '敬語の使い方')"),
386
478
  }, async ({ query }) => {
387
479
  const result = await apiPost("/api/v1/search", { query });
388
480
  let text = `🔍 横断検索結果: ${result.domains_matched}/${result.domains_searched} ドメインでヒット\n\n`;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "edition-mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "mcpName": "io.github.hiroshic9-png/japan-business-operations",
5
- "description": "EDITION Intelligence Platform \u2014 MCP server for Japan operations intelligence (10 knowledge domains)",
5
+ "description": "EDITION Intelligence Platform \u2014 MCP server for Japan operations intelligence (14 knowledge domains, 31 tools)",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "bin": {