Skip to main content
Glama

Generate the invoices that are due

invoice_generate_due

Generate invoices for all scheduled occurrences due on or before a date, skip already invoiced periods, and render each PDF. Preview with dry-run to see what would be created.

Instructions

Create a real invoice in the invoice server for every schedule occurrence on or before as_of that has not been invoiced yet, and render each PDF. Returns what was created, what was skipped and what is still due.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoYYYY-MM-DD, defaults to today. Every occurrence on or before this date that has not been invoiced is billed. Idempotent: one invoice per schedule per period, keyed by the occurrence date, so running it twice creates nothing the second time
dry_runNoList what would be created without creating anything. Default false. One run creates at most 60 invoices, oldest period first
schedule_idNoOnly this schedule. Free and unlimited on every tier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden of disclosing side effects, and it does: it creates 'real' invoices, renders PDFs, and returns a summary of created, skipped, and still-due items. The parameter descriptions add idempotency, dry-run, and limit details, further improving transparency.

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?

The description is two tight sentences: it leads with the core behavior and follows with the return summary. No redundant phrasing or filler, and it is well-structured for quick agent parsing.

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?

The tool has no output schema, but the description names the three return categories and the parameter descriptions cover defaults, idempotency, dry-run, and the 60-invoice cap. This is sufficient for an agent to invoke the tool correctly, though return structure details are absent.

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 the parameters are already fully documented in the schema. The main description does not add parameter-level meaning beyond the schema, which matches the baseline of 3 for high coverage.

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 states a specific action: create real invoices for schedule occurrences on or before as_of that haven't been invoiced, and render PDFs. This clearly identifies the resource and behavior, distinguishing it from siblings like invoice_create or invoice_from_hours by focusing on schedule-driven batch generation.

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

Usage Guidelines3/5

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

Usage context is implied: this is for generating due invoices from schedules, especially in bulk. However, it does not explicitly state when to choose this over alternatives like invoice_create or invoice_from_hours, nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools