Skip to main content
Glama

search_jaish_tsutatsu

Search Japanese labor safety and health circulars from JAISH by keyword to find regulations on occupational safety laws, pneumoconiosis prevention, and work environment standards.

Instructions

安全衛生情報センター(JAISH)から安全衛生関連の通達をキーワード検索する。労働安全衛生法、じん肺法、作業環境測定法等に関する通達を検索可能。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes検索キーワード。例: "特定化学物質", "有機溶剤", "安全教育", "健康診断", "石綿", "足場"
limitNo最大取得件数(デフォルト10、最大30)
max_pagesNo検索する年度数(デフォルト5)。増やすと古い通達も検索するが時間がかかる。

Implementation Reference

  • The handler function that executes the search_jaish_tsutatsu tool logic, calling the jaish-tsutatsu-service.
    async (args) => {
      try {
        const result = await searchJaishTsutatsu({
          keyword: args.keyword,
          limit: args.limit,
          maxPages: args.max_pages,
        });
    
        if (result.results.length === 0) {
          return {
            content: [{
              type: 'text' as const,
              text: `「${args.keyword}」に一致する安衛通達が見つかりませんでした(${result.pagesSearched}年度分を検索)。\nmax_pages を増やすと検索範囲が広がります。キーワードを変えて再検索も試してください。\n厚労省通達は search_mhlw_tsutatsu で検索できます。`,
            }],
          };
        }
    
        const lines = result.results.map((r, i) =>
          `${i + 1}. **${r.title}**\n   日付: ${r.date}\n   番号: ${r.number}\n   url: \`${r.url}\``
        );
    
        return {
          content: [{
            type: 'text' as const,
            text: `# JAISH安衛通達検索結果: 「${args.keyword}」\n\n${result.results.length}件(${result.pagesSearched}年度分を検索)\n\n${lines.join('\n\n')}\n\n---\n※ 本文を読むには get_jaish_tsutatsu で url を指定してください。\n出典:安全衛生情報センター(中央労働災害防止協会)`,
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `エラー: ${error instanceof Error ? error.message : String(error)}`,
          }],
          isError: true,
        };
      }
    }
  • The registration function that defines the 'search_jaish_tsutatsu' tool with its schema and handler.
    export function registerSearchJaishTsutatsuTool(server: McpServer) {
      server.tool(
        'search_jaish_tsutatsu',
        '安全衛生情報センター(JAISH)から安全衛生関連の通達をキーワード検索する。労働安全衛生法、じん肺法、作業環境測定法等に関する通達を検索可能。',
        {
          keyword: z.string().describe(
            '検索キーワード。例: "特定化学物質", "有機溶剤", "安全教育", "健康診断", "石綿", "足場"'
          ),
          limit: z.number().optional().describe(
            '最大取得件数(デフォルト10、最大30)'
          ),
          max_pages: z.number().optional().describe(
            '検索する年度数(デフォルト5)。増やすと古い通達も検索するが時間がかかる。'
          ),
        },
        async (args) => {
          try {
            const result = await searchJaishTsutatsu({
              keyword: args.keyword,
              limit: args.limit,
              maxPages: args.max_pages,
            });
    
            if (result.results.length === 0) {
              return {
                content: [{
                  type: 'text' as const,
                  text: `「${args.keyword}」に一致する安衛通達が見つかりませんでした(${result.pagesSearched}年度分を検索)。\nmax_pages を増やすと検索範囲が広がります。キーワードを変えて再検索も試してください。\n厚労省通達は search_mhlw_tsutatsu で検索できます。`,
                }],
              };
            }
    
            const lines = result.results.map((r, i) =>
              `${i + 1}. **${r.title}**\n   日付: ${r.date}\n   番号: ${r.number}\n   url: \`${r.url}\``
            );
    
            return {
              content: [{
                type: 'text' as const,
                text: `# JAISH安衛通達検索結果: 「${args.keyword}」\n\n${result.results.length}件(${result.pagesSearched}年度分を検索)\n\n${lines.join('\n\n')}\n\n---\n※ 本文を読むには get_jaish_tsutatsu で url を指定してください。\n出典:安全衛生情報センター(中央労働災害防止協会)`,
              }],
            };
          } catch (error) {
            return {
              content: [{
                type: 'text' as const,
                text: `エラー: ${error instanceof Error ? error.message : String(error)}`,
              }],
              isError: true,
            };
          }
        }
      );
    }
  • The service function that implements the logic for searching JAISH (Japan Advanced Information Center for Safety and Health) notifications.
    export async function searchJaishTsutatsu(opts: {
      keyword: string;
      limit?: number;
      maxPages?: number;
    }): Promise<JaishSearchResponse> {
      const limit = Math.min(opts.limit ?? 10, 30);
      const maxPages = Math.min(opts.maxPages ?? 5, JAISH_INDEX_PAGES.length);
    
      const allResults: JaishIndexEntry[] = [];
      let pagesSearched = 0;
    
      for (let i = 0; i < maxPages && allResults.length < limit; i++) {
        const path = JAISH_INDEX_PAGES[i];
        try {
          const html = await fetchJaishIndex(path);
          const entries = parseJaishIndex(html);
          const filtered = filterJaishEntries(entries, opts.keyword);
          allResults.push(...filtered);
          pagesSearched++;
        } catch {
          // 404 or timeout — skip this year
          continue;
        }
      }
    
      return {
        results: allResults.slice(0, limit),
        pagesSearched,
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the source (JAISH) and searchable content types, but lacks critical details: it doesn't specify the output format (e.g., list of results with titles/dates/links), pagination behavior, error handling, rate limits, or authentication requirements. For a search tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured in two sentences: the first states the core functionality, and the second adds context on searchable laws. There's no fluff or redundancy, and it's front-loaded with the main purpose. However, it could be slightly more efficient by integrating the law examples into the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (search tool with 3 parameters, no output schema, and no annotations), the description is incomplete. It lacks output details (what the search returns), error cases, and usage guidelines relative to siblings. Without an output schema, the description should ideally hint at the result structure (e.g., 'returns a list of notifications with titles and links'), but it doesn't, leaving the agent uncertain about the tool's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters (keyword, limit, max_pages) with descriptions and examples. The description adds no additional parameter semantics beyond what's in the schema—it doesn't explain keyword matching (e.g., partial/full), default values beyond the schema, or interactions between parameters. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'search for safety and health-related notifications from JAISH using keywords.' It specifies the resource (JAISH notifications) and the action (keyword search), and mentions relevant laws (Labor Safety and Health Act, Pneumoconiosis Act, etc.). However, it doesn't explicitly differentiate from sibling tools like 'search_mhlw_tsutatsu' or 'search_law,' which likely search different sources or content types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_mhlw_tsutatsu' (likely for MHLW notifications) and 'search_law' (likely for laws), it's unclear when to prefer this JAISH-specific search over others. There's no mention of prerequisites, exclusions, or comparative contexts, leaving usage decisions ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kentaroajisaka/labor-law-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server