Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 })] };
        },
      );
    }
  • 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);
  • 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) };
    }
  • 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
    `;
Behavior3/5

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

Describes output but does not disclose any behavioral traits beyond listing (no annotations provided). Since it's a simple parameterless list, it is adequate but could mention any restrictions or prerequisites.

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?

Single sentence that efficiently conveys purpose, domain, and output details with no redundancy.

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?

Given no parameters and no output schema, the description provides sufficient context about what the tool does and returns. Could note the absence of filters, but the empty schema already implies that.

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?

No parameters exist, so schema coverage is 100%. Description adds value by detailing what is returned (id, label, citation, full rules), compensating for lack of output schema.

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?

Clearly states the tool lists bundled jurisdiction rule packs for meal/rest compliance, and describes the return fields (id, label, citation, rules). Distinct from siblings which deal with other compliance functions.

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

Usage Guidelines3/5

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

Implied that this is a read-only listing for rule packs, but no explicit when-to-use or when-not-to-use guidance, nor mention of alternatives.

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