get_jaish_tsutatsu
Retrieve full-text administrative circulars from Japan's Industrial Safety and Health Information Center (JAISH) for accurate labor law compliance and reference.
Instructions
安全衛生情報センター(JAISH)の通達本文を取得する。search_jaish_tsutatsu で取得した url を指定。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 通達ページのURL(パスまたは完全URL)。search_jaish_tsutatsu の検索結果から取得。例: "/anzen/hor/hombun/hor1-67/hor1-67-1-1-0.htm" |
Implementation Reference
- src/tools/get-jaish-tsutatsu.ts:5-36 (handler)Tool registration and MCP handler for 'get_jaish_tsutatsu'. It calls the underlying service function to fetch document content.
export function registerGetJaishTsutatsuTool(server: McpServer) { server.tool( 'get_jaish_tsutatsu', '安全衛生情報センター(JAISH)の通達本文を取得する。search_jaish_tsutatsu で取得した url を指定。', { url: z.string().describe( '通達ページのURL(パスまたは完全URL)。search_jaish_tsutatsu の検索結果から取得。例: "/anzen/hor/hombun/hor1-67/hor1-67-1-1-0.htm"' ), }, async (args) => { try { const result = await getJaishTsutatsu({ url: args.url }); const title = result.title || '(タイトル取得不可)'; return { content: [{ type: 'text' as const, text: `# ${title}\n\n${result.body}\n\n---\n出典:安全衛生情報センター(中央労働災害防止協会)\nURL: ${result.url}`, }], }; } catch (error) { return { content: [{ type: 'text' as const, text: `エラー: ${error instanceof Error ? error.message : String(error)}`, }], isError: true, }; } } ); - Business logic service function 'getJaishTsutatsu' that fetches and parses the content of a JAISH notice page.
export async function getJaishTsutatsu(opts: { url: string; }): Promise<JaishDocument> { const html = await fetchJaishPage(opts.url); const { title, body } = parseJaishDocument(html); const fullUrl = getJaishUrl(opts.url); return { title, body, url: fullUrl }; }