Skip to main content
Glama

list_payroll_runs

The company's payroll runs — one per wage period — newest period first (CompanyMember read; the money is aggregate, no per-employee PII).

A run walks draft → calculated → approved → posted → paid → locked (plus reversed); run_kind separates a regular run from a correction/reversal, which are always separate runs, never in-place edits, and are linked by original_run_id / reversed_by_run_id. journal_entry_id is the wage entry it posted (null before posted), and the lifecycle stamps (calculated_at, approved_at, posted_at, paid_at, locked_at) say when each step happened.

Each row also carries employee_count, gross_total/net_total and the validation error_count/warning_count — a run with errors must not be approved. staleness is computed at read time: non-null means master data changed after the run was calculated (a retroactive correction), so the frozen figures no longer match; it is advisory, and its action says what to do.

Filters: status_filter narrows to one lifecycle state, year to runs whose period starts in that calendar year. No paging. Use GET …/payroll/runs/due for wage months that have no run yet.

Input Schema

NameRequiredDescriptionDefault
yearNo
company_idYes
status_filterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: read-only ('CompanyMember read'), no per-employee PII, no paging, lifecycle semantics (draft→...→locked, plus reversed), corrections/reversals as separate runs linked by original_run_id/reversed_by_run_id, journal_entry_id null before posted, per-row metrics, error_count blocking approval, and staleness computed at read time. This is rich, accurate behavioral context.

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?

Long but tightly structured, front-loading the resource and scope before lifecycle and field detail. Every sentence contributes domain information, though the density is higher than strictly necessary for a list tool.

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?

No output schema or annotations exist, so the description must supply return semantics and behavioral traits — and it does, covering row contents, lifecycle stamps, metrics, staleness, filters, and lack of paging. An agent has everything needed to call and interpret this tool correctly.

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?

Schema description coverage is 0%, so the description must compensate; it explains year (runs whose period starts that calendar year) and status_filter (narrows to one lifecycle state, with states enumerated in the prose) while company_id is self-evident. It adds real meaning beyond the bare schema types, though it doesn't document allowed value formatting exhaustively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and scope clearly: 'The company's payroll runs — one per wage period — newest period first', including the read-only nature and that amounts are aggregate. Distinguishes itself from the due-endpoint variant, but does not explicitly differentiate from sibling tools such as list_payroll_employees.

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?

Explains filter usage (status_filter narrows to one lifecycle state, year to period-start year) and names an alternative endpoint for wage months that have no run yet. However, it gives no explicit when-not-to-use guidance or direct comparison to the other payroll/list tools.

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