Skip to main content
Glama

Preview payslip

preview_payslip
Read-only

Price a payslip for a saved employee without saving it: gross, deductions, net and each line, with PAYE, UIF and SDL priced. Send rows in payvalues to see a change before you save it with save_employee. It reads only; nothing is stored or posted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "employee": "<employee>"
    },
    "name": "preview_payslip"
  }
}

Input Schema

NameRequiredDescriptionDefault
paydateNoYYYY-MM-DD. The tax tables in force on this date price PAYE, UIF and SDL. Omitted, today.
employeeYesThe employee id. Their saved package, template and pay values price the slip.
frequencyNoThe pay cadence to price at. Omitted, monthly.
payvaluesNoRows put over the employee's saved pay values for this preview only, one per code. A sent row replaces the saved row for its code. Nothing is saved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / payvalues / items / properties / included
      Added value: +{
      +  "description": "true prices a statutory line the pack marks optIn, which is off unless included.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / payvalues / items / properties / since
      Added value: +{
      +  "description": "YYYY-MM: with included, the month the line applies from.",
      +  "type": "string"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces it with 'It reads only; nothing is stored or posted', removing any doubt about side effects. It also discloses that payvalues rows replace saved rows for their code in this preview only, which is real behavioral context beyond the annotation, though it says nothing about cost, rate limits, or error behavior for unknown codes.

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?

Two tight sentences: the first gives purpose and return contents, the second gives the usage trigger and the no-side-effect guarantee. Nothing is redundant and the most important constraint (nothing saved) lands early.

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

Completeness5/5

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

With no output schema, the description compensates by naming exactly what the call returns (gross, deductions, net, per-line values, statutory components). For a read-only preview tool with fully documented parameters, an agent has everything needed to call it correctly.

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 description coverage is 100%, so all four parameters and the nested payvalues fields (code, rate, quantity, formula, included/excluded, since) are already documented. The description adds the override intent but no syntax or semantics the schema does not already carry; baseline 3 applies.

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?

States a specific verb and resource ('Price a payslip') plus the defining scope qualifier 'for a saved employee without saving it', which separates it from save_payslip and get_payslip. The output shape (gross, deductions, net, each line, PAYE/UIF/SDL) is named up front.

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

Usage Guidelines4/5

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

Explicitly tells the agent the workflow: 'Send rows in payvalues to see a change before you save it with save_employee', naming the downstream alternative. It lacks an explicit when-not clause (e.g. use get_payslip to read an already-saved slip), so the routing is clear but not exhaustive.

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.

Resources