Skip to main content
Glama

Save payslip

save_payslip

Create or edit a DRAFT payslip: employee, pay run, period, pay date and the earning, deduction and contribution lines. Omit id to create; pass an id to edit that payslip. A created payslip is always a draft and an edit never changes the draft flag, so this never posts to the ledger; a finalised payslip refuses an edit. A payslip on a pay run that finalises itself on its pay date is refused.

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": "save_payslip"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
linesNo
notesNo
payrunNo
paydateNo
employeeNo
periodendNo
periodstartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / lines / items / properties / category / description
      Added value: +"credit is an employer credit such as ETI: outside gross, net and cost. Only the pack's statutory credit line books to the ledger; a manual credit line books nothing."
    • changedInput schema / properties / lines / items / properties / category / enum
      Previous value: -[
      -  "earning",
      -  "deduction",
      -  "contribution",
      -  "benefit"
      -]New value: +[
      +  "earning",
      +  "deduction",
      +  "contribution",
      +  "benefit",
      +  "credit"
      +]
  2. Changed5 schema fields changed
    • addedInput schema / properties / lines / items / properties / category / enum
      Added value: +[
      +  "earning",
      +  "deduction",
      +  "contribution",
      +  "benefit"
      +]
    • addedInput schema / properties / lines / items / properties / code / description
      Added value: +"The line's code: letter-led, then letters, digits, _ or -. Formulas and pay values name a line by its code. A reserved code (get_payroll_setup) is refused. Omit it to mint one from the description."
    • addedInput schema / properties / lines / items / properties / formula / description
      Added value: +"A formula over line codes, e.g. \"basic * 0.1\". get_payroll_setup lists the formula names. Null makes the line fixed."
    • addedInput schema / properties / lines / items / properties / role / description
      Added value: +"A pack line role, \"<prefix>-<code>\", e.g. \"sars-3601\". get_payroll_setup lists the roles each category allows."
    • addedInput schema / properties / lines / items / properties / statutory / description
      Added value: +"A statutory id from get_payroll_setup, e.g. \"paye\". The server prices the line and ignores any figure sent."
  3. Changed1 schema field changed
    • removedInput schema / properties / lines / items / properties / payitem
      Removed value: -{
      -  "type": "string"
      -}
  4. Changed1 schema field changed
    • addedInput schema / properties / lines / items / properties / formula
      Added value: +{
      +  "type": "string"
      +}
  5. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond that by stating the write never posts to the ledger, a created payslip is always a draft, an edit never flips the draft flag, and two distinct refusal conditions. Those are exactly the mutation semantics an agent needs before calling.

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?

Three sentences, front-loaded with what is written and how the mode is selected, then the draft/ledger guarantee, then the refusal cases. No sentence is redundant and nothing is buried.

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?

For an eight-parameter mutation tool with no output schema, the description covers the essential behavioral contract: draft-only, non-posting, and the conditions under which the call fails. It does not say what comes back on success (e.g. whether the minted payslip id is returned), which is the only notable omission.

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?

Top-level parameters (employee, payrun, periodstart/periodend, paydate, notes) carry no schema descriptions, and the description compensates by mapping them to concepts and by defining the id semantics that drive create vs edit. It still leaves date/ID formats and the meaning of 'notes' unstated, and the nested line fields rely on their own schema text.

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 opens with a specific verb and resource ('Create or edit a DRAFT payslip') and immediately enumerates the resource's contents (employee, pay run, period, pay date, lines). The DRAFT qualifier and the create-vs-edit split make it distinguishable from a template-save or preview tool.

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?

It gives an explicit decision rule for the two modes: 'Omit id to create; pass an id to edit that payslip,' plus hard exclusions (finalised payslips, pay runs that self-finalise on the pay date). It stops short of naming sibling alternatives such as preview_payslip or get_payslip for inspecting a payslip first.

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