Skip to main content
Glama

Create Month Invoice Drafts

create_month_invoice_drafts
DestructiveIdempotent

Writes the month's invoices as DRAFTS, one per project (and per client for client-level expenses) the connected person may invoice, on the same plan a billing preview of that period and scope returns. Nothing is sent: each draft is marked as drafted by the assistant, and the person reviews and sends it in Hubity. Running it again for the same period and scope updates the drafts it wrote earlier rather than adding new ones; it never overwrites a person's work: a draft a person has edited, one with a sign-off under way, or one already sent is left alone and flagged. Only scopes named in expectPlan are written, and only while their current planHash still matches the one given: a scope whose figures changed since is skipped instead of written, and scopes not named are skipped too. Each scope reports created, updated, unchanged, skipped or nothing, with links to review the draft; the result leads with a plain-language summary.

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.
expectPlanNoMap of scopeKey to the planHash a billing preview returned for that scope. A named scope whose current plan differs is skipped (plan_changed); a scope not named is skipped (not_confirmed).

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?

With annotations already declaring idempotentHint and destructiveHint, the description still adds substantial behavioral context the annotations cannot convey: nothing is sent, drafts are attributed to the assistant, re-runs update rather than duplicate, and human-edited/sign-off/sent drafts are never overwritten but flagged. It also discloses the partial-failure model (scope skipped on plan_changed or not_confirmed).

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?

Single front-loaded paragraph that leads with the core action and the draft-only guarantee before moving to idempotency, guardrails, and result shape. It is dense and clause-heavy, but nearly every clause carries distinct load-bearing information; only the expectPlan restatement is somewhat redundant with the schema.

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 9-parameter, nested-object mutation with partial-failure behavior, the description covers safety (nothing sent), idempotency, non-overwrite guarantees, plan-hash validation, and per-scope outcome vocabulary. With an output schema present it need not detail raw return fields, and it leaves no operational question unanswered.

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 every parameter is already documented in the schema, and the expectPlan skip semantics the description restates are also present in the schema's own parameter description. The description adds little per-parameter meaning beyond that, so the baseline 3 is appropriate.

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 first clause names a specific verb (writes), resource (the month's invoices), and crucial qualifier (as DRAFTS), plus the granularity (one per project, per client for client-level expenses). It is immediately distinguishable from the sibling preview_month_billing, which it explicitly ties itself to.

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 establishes the operating context clearly: run after a billing preview, expectPlan must carry the previewed planHash, and re-running is the supported way to reconcile. It does not, however, name preview_month_billing as the prerequisite tool or state when the agent should fall back to a plain create/update path.

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