Skip to main content
Glama

evaluate_break_compliance

Analyze meal and rest period compliance for a duty day under a jurisdiction rule pack, returning premium hours owed, waiver issues, and rebuttable-presumption risk.

Instructions

Analyse meal & rest period compliance for a duty day under a jurisdiction rule pack. v0.1 ships the California pack (Labor Code §§ 226.7, 512; IWC wage orders). Returns per-meal/rest analysis, premium hours owed at the regular rate, waiver issues, and rebuttable-presumption risk per Donohue v. AMN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesRaw inputs for the day under review.
jurisdictionYesBundled jurisdiction rule pack to apply. Currently CA only; more arrive in subsequent minor versions.
waiversNo

Implementation Reference

  • Tool handler: resolves the day input, then calls evaluateBreakCompliance from @attendance-engine/core with the resolved day, jurisdiction rule pack, and optional waivers. Returns both the resolved day result and the compliance analysis.
        async ({ input, jurisdiction, waivers }) => {
          const result = resolveDay(input);
          const compliance = evaluateBreakCompliance({
            result,
            rules: BREAK_RULE_SETS[jurisdiction],
            waivers: waivers ?? [],
          });
          return { content: [jsonText({ result, compliance })] };
        },
      );
    }
  • Tool input schema: 'input' (ResolveDayInputSchema), 'jurisdiction' (enum CA), and optional 'waivers' array with applies/date/signed/fileRef fields.
    {
      input: ResolveDayInputSchema.describe('Raw inputs for the day under review.'),
      jurisdiction: z
        .enum(['CA'])
        .describe('Bundled jurisdiction rule pack to apply. Currently CA only; more arrive in subsequent minor versions.'),
      waivers: z
        .array(
          z.object({
            applies: z.enum(['first-meal', 'second-meal']),
            date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
            signed: z.boolean(),
            fileRef: z.string().optional(),
          }),
        )
        .optional(),
    },
  • Registration function exported as registerEvaluateBreakCompliance; registers the tool via server.tool() with name 'evaluate_break_compliance'.
    export function registerEvaluateBreakCompliance(server: McpServer): void {
      server.tool(
        'evaluate_break_compliance',
        "Analyse meal & rest period compliance for a duty day under a jurisdiction rule pack. v0.1 ships the California pack (Labor Code §§ 226.7, 512; IWC wage orders). Returns per-meal/rest analysis, premium hours owed at the regular rate, waiver issues, and rebuttable-presumption risk per Donohue v. AMN.",
        {
          input: ResolveDayInputSchema.describe('Raw inputs for the day under review.'),
          jurisdiction: z
            .enum(['CA'])
            .describe('Bundled jurisdiction rule pack to apply. Currently CA only; more arrive in subsequent minor versions.'),
          waivers: z
            .array(
              z.object({
                applies: z.enum(['first-meal', 'second-meal']),
                date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
                signed: z.boolean(),
                fileRef: z.string().optional(),
              }),
            )
            .optional(),
        },
        async ({ input, jurisdiction, waivers }) => {
          const result = resolveDay(input);
          const compliance = evaluateBreakCompliance({
            result,
            rules: BREAK_RULE_SETS[jurisdiction],
            waivers: waivers ?? [],
          });
          return { content: [jsonText({ result, compliance })] };
        },
      );
    }
  • src/server.ts:38-38 (registration)
    Tool registration call: registerEvaluateBreakCompliance(server) in the createServer function.
    registerEvaluateBreakCompliance(server);
  • Helper function jsonText: serializes response data as pretty-printed JSON wrapped as an MCP text content block.
    export function jsonText(value: unknown): { type: 'text'; text: string } {
      return { type: 'text', text: JSON.stringify(value, null, 2) };
    }
Behavior3/5

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

With no annotations, the description carries full burden for behavioral disclosure. It describes what the tool returns and references legal codes, but does not state whether it modifies data, requires authentication, or has performance implications. The mention of specific case law (Donohue v. AMN) adds context, but overall transparency is moderate.

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 concise, consisting of three sentences that front-load the main purpose and include version and legal references. Every sentence contributes essential information without unnecessary elaboration.

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?

Given the tool's complexity (nested inputs, no output schema), the description provides a useful overview of returned items but lacks details on output structure or behavior with invalid inputs. It is adequate but not comprehensive.

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 coverage is 67%. The description does not explain parameters in detail, but the schema itself provides decent coverage for 'input' and 'jurisdiction'. The description adds value by noting 'waiver issues' in the output, implying the waivers parameter's role. However, it does not compensate fully for the undocumented 'waivers' parameter.

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 description clearly states the tool analyzes meal and rest period compliance for a duty day under a specific jurisdiction rule pack (California). It lists specific return items (per-meal/rest analysis, premium hours, waiver issues, presumption risk), distinguishing it from siblings like audit_period_compliance or resolve_day.

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 does not provide explicit guidance on when to use this tool versus its siblings. It mentions that v0.1 only supports California, but lacks instructions on alternatives for other jurisdictions or 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.

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/arifur9993/attendance-engine-mcp'

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