count_pe_working_days
Use this when you need an auditable Peru working-day count. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery. Do not use this when choose calendar_scope and workweek explicitly. National holidays and public-sector compensable...
This record as markdown: /tools/com-tttkmbb-calcgrid/count-pe-working-days.md
What count_pe_working_days does on Calcgrid
AI agents call count_pe_working_days to retrieve information from Calcgrid without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
end_date | string | Yes | Last date in 2026-2026. |
workweek | integer | Yes | Required declared baseline: 5 = Saturday-Sunday rest, 6 = Sunday rest. Confirm the applicable roster. |
start_date | string | Yes | First date in 2026-2026. |
calendar_scope | string | Yes | Required: national_statutory uses 16 national holidays; public_sector also applies the two published compensable days. Neither is a tax or individual employee r |
include_end_date | boolean | — | Whether end_date participates. |
include_start_date | boolean | — | Whether start_date participates. |
Parameters from the server's own tool schema.
Why count_pe_working_days is rated Low
Even though count_pe_working_days only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Attacks that exploit this kind of access
The rule that runs count_pe_working_days safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Calcgrid, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For count_pe_working_days, this is the rule to start with:
count_pe_working_days is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Calcgrid, apply this rule, and every count_pe_working_days call is checked against it from then on.
Questions about count_pe_working_days
Use this when you need an auditable Peru working-day count. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery. Do not use this when choose calendar_scope and workweek explicitly. National holidays and public-sector compensable days have different applicability. This is a declared five-day (Saturday-Sunday rest) or six-day (Sunday rest) planning calendar, not proof of an individual's roster. Essential services, private-employer adoption, compensating shifts, regional holidays, banking, school, tax and procedural deadline calendars require separate evidence. The two compensable public-sector days remain working days for tax purposes. Later decrees require a new snapshot; dates beyond 2026 are unsupported. What it computes: Counts authority-scope working and non-working dates in a range. Required calendar_scope and workweek distinguish national holidays from compensable public-sector days and five/six-day rosters. Example user requests: Peru: National July week. | Peru: Public-sector July week. Inputs: start_date (date); end_date (date); include_start_date (boolean, optional); include_end_date (boolean, optional); calendar_scope (enum); workweek (integer). Complete JSON argument examples: {"start_date":"2026-07-24","end_date":"2026-07-30","calendar_scope":"national_statutory","workweek":5} | {"start_date":"2026-07-24","end_date":"2026-07-30","calendar_scope":"public_sector","workweek":5} Outputs: working_days, non_working_days, public_holidays_counted, territory, territory_name, day_type, holiday_names, holiday_kinds, holiday_details, calendar_scope, holiday_policy, substitute_day_policy, calendar_profile, dataset_version, sources, calendar_selection, workweek, compensable_day_details. Formula: working day = outside selected weekly rest and selected holiday layer Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/peru-public-working-days-between with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/everyday/peru-public-working-days-between.md. It is categorised as a Read tool in the Calcgrid MCP Server, which means it retrieves data without modifying state.
count_pe_working_days accepts 6 parameters: end_date, workweek, start_date, calendar_scope, include_end_date, include_start_date. Required: end_date, workweek, start_date, calendar_scope. The full parameter table on this page comes from the server's own tool schema.
Register the Calcgrid MCP server in PolicyLayer and add a rule for count_pe_working_days: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Calcgrid. Nothing to install.
count_pe_working_days is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the count_pe_working_days rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for count_pe_working_days. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
count_pe_working_days is provided by the Calcgrid MCP server (https://tttkmbb.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Calcgrid, and thousands of servers like it.
This server
Across the catalogue