list_rule_packs
Retrieve all bundled jurisdiction rule packs for meal and rest compliance, including pack IDs, labels, citation sources, and full rule definitions.
Instructions
List bundled jurisdiction rule packs (meal/rest compliance). Returns each pack with id, human label, citation source, and full rule definitions.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_rule_packs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/list-rule-packs.ts:1-20 (handler)Full tool handler for 'list_rule_packs'. Registers the tool with the MCP server, iterates over BREAK_RULE_SETS to list available jurisdiction rule packs with id, label, source, and meal/rest rule definitions.
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { BREAK_RULE_SETS } from '@attendance-engine/core'; import { jsonText } from '../util.js'; export function registerListRulePacks(server: McpServer): void { server.tool( 'list_rule_packs', 'List bundled jurisdiction rule packs (meal/rest compliance). Returns each pack with id, human label, citation source, and full rule definitions.', {}, async () => { const packs = Object.values(BREAK_RULE_SETS).map((pack) => ({ id: pack.id, label: pack.label, source: pack.source, rules: { meal: pack.meal, rest: pack.rest }, })); return { content: [jsonText({ packs })] }; }, ); } - src/tools/list-rule-packs.ts:9-9 (schema)The tool takes no input parameters (empty schema object '{}'). Output is a text content block with a 'packs' array.
{}, - src/server.ts:15-41 (registration)Registration: import and call of registerListRulePacks in the server setup.
import { registerListRulePacks } from './tools/list-rule-packs.js'; import { registerAuditPeriodCompliance } from './tools/audit-period-compliance.js'; import { registerDiagnosePunches } from './tools/diagnose-punches.js'; import { registerDocsResources } from './resources/docs.js'; import { registerAnalyseTimecardPrompt } from './prompts/analyse-timecard.js'; import { registerRosterPlannerPrompt } from './prompts/roster-planner.js'; export interface CreateServerOptions { /** Override the advertised server name (default: 'attendance-engine'). */ name?: string; /** Override the advertised server version (default: matches package.json). */ version?: string; } export function createServer(options: CreateServerOptions = {}): McpServer { const server = new McpServer({ name: options.name ?? 'attendance-engine', version: options.version ?? '0.1.0', }); // Tools — the work surface. registerResolveDay(server); registerResolvePeriod(server); registerEvaluateBreakCompliance(server); registerApplyRounding(server); registerGenerateRoster(server); registerListRulePacks(server); - src/util.ts:1-9 (helper)The jsonText helper used to format the output as a pretty-printed JSON text block.
/** Tiny helpers shared across tool handlers. */ /** * Serialize a value as pretty JSON and wrap it as an MCP text-content block. * Centralised so every tool's response shape stays consistent. */ export function jsonText(value: unknown): { type: 'text'; text: string } { return { type: 'text', text: JSON.stringify(value, null, 2) }; } - src/resources/docs.ts:17-23 (helper)Documentation listing 'list_rule_packs' as available, describing it as 'discover available jurisdictions'.
- **list_rule_packs** — discover available jurisdictions Time-zone rule: every ISO timestamp must carry an explicit offset. The engine never reads the host timezone. DST days work because offsets are explicit. Source: https://github.com/arifur9993/attendance-engine `;