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.

Input Schema

NameRequiredDescriptionDefault
idNo
linesNo
notesNo
payrunNo
paydateNo
employeeNo
periodendNo
periodstartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. Changed1 schema field changed
    • removedInput schema / properties / lines / items / properties / payitem
      Removed value: -{
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedInput schema / properties / lines / items / properties / formula
      Added value: +{
      +  "type": "string"
      +}
  4. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations it discloses the crucial side-effect boundary: the operation never posts to the ledger, creation is always draft, editing never flips the draft flag, and edits on finalised payslips or self-finalising pay runs are rejected. These are exactly the behaviours an agent cannot infer from readOnlyHint=false / destructiveHint=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the create/edit split, and every sentence carries decision-relevant content. The final sentence about self-finalising pay runs is slightly convoluted in phrasing but not redundant.

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

Completeness3/5

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

For an 8-parameter mutation with no output schema and no annotations beyond the safety hints, the draft/ledger semantics are well covered, but the description never says what comes back. Because editing requires an id, an agent needs to know whether the create path returns the new payslip id — that gap matters for chaining into preview_payslip or finalise_payslips.

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 0% at the top level, so the description carries the burden, and it only partly does: it fully explains the create-vs-edit meaning of id and conceptually names employee, payrun, period and lines. It adds no format or reference guidance for paydate, periodstart/periodend, payrun or employee, so the agent still cannot tell what identifiers or date shapes are accepted.

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 pair and resource ('Create or edit a DRAFT payslip') and enumerates the domain fields it covers. Placing 'DRAFT' in caps immediately separates it from finalise_payslips, preview_payslip and get_payslip without the agent needing to open another schema.

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 concrete when-to-use rules ('Omit id to create; pass an id to edit') and two explicit refusal conditions (finalised payslip, pay run that finalises on its pay date). It stops short of naming alternatives such as preview_payslip for a dry run or finalise_payslips for the next step, which is the only thing separating it from a 5.

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