Skip to main content
Glama

get_mhlw_tsutatsu

Retrieve the full text of Japanese labor ministry administrative circulars using data IDs from search results to access official legal documents for compliance and reference.

Instructions

厚生労働省の通達本文を取得する。search_mhlw_tsutatsu で取得した data_id を指定。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_idYes通達のdataId。search_mhlw_tsutatsu の検索結果から取得。例: "00tb2035"
page_noNoページ番号(デフォルト1)。長い通達は複数ページに分かれている場合がある。

Implementation Reference

  • The actual business logic implementation for fetching the MHLW tsutatsu (notification) document.
    export async function getMhlwTsutatsu(opts: {
      dataId: string;
      pageNo?: number;
    }): Promise<MhlwDocument> {
      const pageNo = opts.pageNo ?? 1;
      const html = await fetchMhlwDocument(opts.dataId, pageNo);
    
      // MHLW がエラーページを返した場合を検出(<title>エラー</title>)
      if (html.includes('<title>エラー</title>')) {
        const errMatch = html.match(/\[ERR[^\]]*\]([^<]*)/);
        const errMsg = errMatch ? errMatch[1].trim() : '通達が見つかりません';
        throw new Error(`MHLW エラー (dataId: ${opts.dataId}): ${errMsg}`);
      }
    
      const { title, body } = parseMhlwDocument(html);
      const url = getMhlwDocUrl(opts.dataId, pageNo);
    
      return { title, dataId: opts.dataId, body, url };
    }
  • The tool registration and MCP handler definition for get_mhlw_tsutatsu.
    export function registerGetMhlwTsutatsuTool(server: McpServer) {
      server.tool(
        'get_mhlw_tsutatsu',
        '厚生労働省の通達本文を取得する。search_mhlw_tsutatsu で取得した data_id を指定。',
        {
          data_id: z.string().describe(
            '通達のdataId。search_mhlw_tsutatsu の検索結果から取得。例: "00tb2035"'
          ),
          page_no: z.number().optional().describe(
            'ページ番号(デフォルト1)。長い通達は複数ページに分かれている場合がある。'
          ),
        },
        async (args) => {
          try {
            const result = await getMhlwTsutatsu({
              dataId: args.data_id,
              pageNo: args.page_no,
            });
    
            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,
            };
          }
        }
      );
    }
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. While it mentions that long notifications may be paginated (implying multi-page retrieval), it doesn't cover other important behavioral aspects like authentication requirements, rate limits, error conditions, or what happens when invalid parameters are provided. The description provides some context but leaves significant gaps.

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

Conciseness5/5

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

The description is extremely concise with just two sentences that each serve a clear purpose: the first states the tool's function, the second explains the parameter requirement. There's zero wasted language and it's effectively front-loaded with the core purpose.

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

Completeness3/5

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

For a read-only retrieval tool with 2 parameters and 100% schema coverage, the description provides the minimum viable information. However, without annotations or an output schema, it should ideally explain more about the return format, error conditions, or pagination behavior beyond what's implied in the parameter descriptions. The description is adequate but has clear gaps in behavioral context.

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 fully documents both parameters. The description adds minimal value beyond the schema - it mentions that data_id comes from 'search_mhlw_tsutatsu' (implied in schema) and that long notifications may be paginated (implied in schema's page_no description). The baseline of 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: '厚生労働省の通達本文を取得する' (retrieve the text of MHLW notifications). It specifies the resource (MHLW notifications) and the action (retrieve text), but doesn't explicitly differentiate from sibling tools like 'get_jaish_tsutatsu' or 'get_law' beyond mentioning the source agency.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: it requires a data_id obtained from 'search_mhlw_tsutatsu'. This establishes a workflow dependency. However, it doesn't explicitly state when NOT to use it or mention alternatives like the sibling 'get_jaish_tsutatsu' for different agency notifications.

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