Skip to main content
Glama

Preview Month Billing

preview_month_billing
Read-onlyIdempotent

Previews what billing a month would draft, without writing anything: one proposed invoice per project (and per client for client-level expenses) the connected person may invoice. Approved and locked time with a rate, the period's billable expenses, contract progress ready to bill, and the retainer fee once per period go on; anything left off or worth a decision (unapproved time, a missing rate, a contract cap, an open month) is flagged with its figures. Each scope says whether drafting would create an invoice, update one or do nothing, with its lines, totals, flags and a link into Hubity. The preview is the period's work in progress (WIP): approved, rated, unbilled time in the period, plus the period's expenses, contract progress and retainer fees; other time is not counted. Each scope carries a fingerprint of its plan (planHash) that drafting checks, and the result leads with a plain-language summary. Answers questions like "bill everything for October" or "what is our WIP?". Nothing is created or sent.

Input Schema

NameRequiredDescriptionDefault
toNoLast day of a custom period, YYYY-MM-DD. Needs from.
fromNoFirst day of a custom period, YYYY-MM-DD. Needs to.
limitNoScopes per page (default 10).
monthNoThe calendar month to bill, as YYYY-MM (e.g. "2026-10"). Takes a month, or from and to. With neither, the last full month in the person's time zone.
cursorNonextCursor from the previous page of the same request.
clientIdNoOnly this client's projects (and its client-level expenses).
projectIdNoOnly this project.
clientNameNoOnly this client, by exact name (any case). When several clients share the name, the call is refused and returns the candidate clients with their clientIds.

Output Schema

NameRequiredDescriptionDefault
replyNo
periodNo
scopesNo
summaryNo
replyTextNo
nextCursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial behavior beyond them: exactly which items go on the draft, which items get flagged (unapproved time, missing rate, contract cap, open month), the per-scope create/update/no-op outcome, and the planHash fingerprint that drafting later checks. That is real operational context an agent cannot get from the structured fields.

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?

The core purpose is front-loaded in the first sentence and most sentences carry distinct information. It is still a very dense single block with mild redundancy ('Each scope...' used twice, restating the read-only guarantee at both the start and end), which costs a point but does not obscure the message.

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?

For a complex, paginated preview tool with a full output schema, the description covers what is included, what is excluded, what each result carries (lines, totals, flags, planHash, deep link, plain-language summary), and confirms no side effects. Nothing an agent needs to call it correctly is missing.

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 schema already documents month/from/to, limit, cursor and the three scope filters in full. The description adds conceptual meaning to 'the period' (WIP definition) but no syntax, format or constraint detail beyond what the schema states, so the 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?

The opening clause names a specific verb and resource ('Previews what billing a month would draft') and immediately scopes it as non-writing ('without writing anything' / 'Nothing is created or sent'). That framing cleanly separates it from the write-path siblings like create_month_invoice_drafts, so an agent can route without opening any 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 invocation contexts ('bill everything for October', 'what is our WIP?') and clearly states what is and is not counted (approved/rated/unbilled time plus expenses, contract progress and retainer fees; other time excluded). It never explicitly names the alternative tool to call when you do want to actually draft, so the when-not side is implied rather than spelled out.

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