Skip to main content
Glama

日本の給与・社会保険・労働法

割増賃金(時間外・深夜・休日)の計算

calculate_overtime_pay

Works out statutory premium pay under 労働基準法第37条 — overtime, night work and work on a statutory holiday.

The rates do not simply add up, and getting this wrong under-pays wages. A night premium stacks on top: overtime at night is 1.25 + 0.25 = 1.5, holiday work at night is 1.35 + 0.25 = 1.6. But a statutory holiday carries no overtime premium at all — a day with no duty to work has nothing to exceed — so holiday hours are 1.35, never 1.6 by adding overtime. Overtime beyond sixty hours in a month is 50%, and the deferral that exempted small employers ended on 1 April 2023, so headcount no longer matters.

Rounding follows 昭和63年基発第150号, which rounds each category separately rather than once at the end, so the total will not always match a single multiplication. Rounding the hours themselves down is a breach of 労基法第24条 and this tool will not do it.

base_monthly_pay must exclude the seven allowances that 労基法37条5項 and 施行規則21条 enumerate exhaustively, and only those. Exclusion turns on substance, not the name: a 「家族手当」 paid at a flat rate regardless of dependants cannot be excluded. The response lists all seven. Do not guess at whether an allowance qualifies — ask which way it is paid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
night_hoursNoHow many of those hours fell between 22:00 and 05:00.
holiday_hoursNoHours worked on a statutory holiday.
overtime_hoursNoStatutory overtime hours, excluding work on a statutory holiday.
base_monthly_payYesMonthly pay forming the premium base, after removing any of the seven excludable allowances.
holiday_night_hoursNoHow many of those fell between 22:00 and 05:00.
monthly_scheduled_hoursYes月平均所定労働時間 — annual scheduled working days times daily hours, divided by twelve.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses substantial behavior: rate stacking (1.25 + 0.25 = 1.5), holiday having no overtime premium, the 60-hour 50% threshold, per-category rounding under 昭和63年基発第150号, and the 1 April 2023 end of the small-employer deferral. It loses a point for slightly opaque references like '従業員マイスター's pay detail' and the final instruction to 'Ask for the full name of the tool,' which is unclear rather than enlightening.

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

Conciseness3/5

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

The core information is front-loaded and substantive, but the description is long and contains two extraneous asides: '2023年4月 means April 2023' and the confusing final sentence 'Ask for the full name of the tool to clarify before proceeding.' These could be trimmed without losing meaning, and they slightly muddy an otherwise well-organized explanation.

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

Completeness4/5

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

For a complex statutory calculation with no output schema and no annotations, the description covers the legal rates, rounding, applicability, exclusions, and how to route edge cases to calculate_payslip. It is nearly complete, but it still does not state the return shape/value of the tool, and the 60-hour threshold is described without fully specifying how the single overtime_hours parameter carries hours above 60.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already describes all six parameters. The description adds value beyond it by clarifying what base_monthly_pay should and should not include ('a premium is not an allowance, so include it'), explaining that overtime_hours excludes holiday work, and describing the rate logic that determines how the hour categories interact.

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

Purpose5/5

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

The first sentence names a precise verb and resource: 'Works out statutory premium pay under 労働基準法第37条 — overtime, night work and work on a statutory holiday.' It names the legal basis and the three covered categories, and later points to calculate_payslip for a different scope, which distinguishes it from a key sibling.

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

Usage Guidelines5/5

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

The description gives an explicit routing rule: 'If you need amounts after a mid-month entry or leaving, use calculate_payslip...' It also states applicability ('Applies to all periods in employment since 1 April 2023') and exclusions ('Does not determine work rules or agreements'), so an agent knows when not to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.8/5.0
Disambiguation4/5

Most tools have distinct, well-defined jobs—payroll calculations, revision judgments, eligibility checks, and data lookups are clearly separated. The main remaining risk is among the standard-remuneration judgment tools and the batch/singleton pairs, but their descriptions are detailed enough to prevent serious misselection.

Naming Consistency3/5

There is a reasonably recognizable pattern with calculate_, judge_, check_, get_, and validate_ groups. However, several noun-phrase names (business_days, consumption_tax, national_insurance, commuting_allowance_exemption) and overlapping verb choices (decide_ vs judge_ vs check_) prevent a fully consistent verb_noun convention.

Tool Count2/5

At 30 tools, the surface is materially larger than the 3–15 range that keeps an agent's selection burden low. Batch variants and three separate standard-remuneration revision tools add complexity, and although the domain is broad, the count feels heavy for an assistant to choose from confidently.

Completeness4/5

The core workflows are well covered: monthly pay, bonuses, overtime, standard-remuneration determination, year-end adjustment, resident tax, leave, worker classification, and invoice validation. Gaps exist around statutory benefit payments such as sickness or maternity allowances and retirement-specific processing, but most payroll and social insurance tasks can be completed without dead ends.