Skip to main content
Glama

Invoice from hours

invoice_from_hours

Creates an invoice by billing hours at an hourly rate, with optional currency conversion and tax/discount adjustments.

Instructions

Shortcut for the common case: bill one client for N hours at an hourly rate. Creates and returns a single-line invoice, converting the rate into target_currency when you supply fx_rates, and echoing back any entry_ids.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateYesHourly rate in major units, expressed in currency (or the business default currency)
hoursYes
notesNo
clientYes
currencyNoCurrency the rate is in. Without target_currency this is also the invoice currency
due_daysNo
fx_ratesNoConversion rates, the same pair expense_to_invoice takes: fx_rates maps the RATE's currency to the number of target units one of it buys, meaning 1 unit of that currency = X units of target_currency, e.g. {"EUR": 1.1578} with target_currency "USD". You supply the rate; nothing here fetches or guesses one
tax_rateNo
entry_idsNoTime-tracker entry ids these hours came from (the entry_ids invoice_summary returns). Echoed back with the new invoice number so you can call entry_mark_billed
issue_dateNo
descriptionNoLine description, default 'Consulting services'
round_totalNoD-R46: when converting with fx_rates, round the line's TOTAL to the exact converted amount instead of rounding the hourly rate to cents first. Default false keeps the D-R24 basis (unit price x hours always equals the printed line, so a rounding_note explains any drift from the exact conversion); true removes the drift but unit_price x hours may then be a cent or two off the printed total.
target_currencyNoIssue the invoice in this currency instead, converting the rate. Needs fx_rates for the rate currency
discount_percentNo

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 behavioral disclosure burden. It clearly states the side effect ('Creates... an invoice') and the result behavior ('returns a single-line invoice, converting the rate... and echoing back any entry_ids'). This gives an agent a solid sense of what will happen, though it could also mention that the invoice is not automatically marked billed until entry_mark_billed is called.

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?

Two sentences, front-loaded with the essential use case, then the key behavioral details. Every sentence adds value without unnecessary elaboration or restating the tool name.

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

Completeness2/5

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

Despite a rich schema, the tool has 14 parameters, no annotations, and no output schema, so the description alone is not enough for an agent to fully understand the return shape or the full behavior across optional parameters. It explains the core case well but leaves significant context to be inferred from the schema.

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?

The description adds meaning for the core fields client/hours/rate and the relationships around fx_rates and entry_ids, but schema coverage is only 50% and many optional parameters (notes, due_days, tax_rate, discount_percent, issue_date) are not addressed in the description. It partially compensates for the schema gap but does not fully carry the burden for all 14 parameters.

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?

States a specific operation: 'Creates and returns a single-line invoice' for bill one client for N hours at an hourly rate. Differentiates from sibling tools like invoice_create by framing it as a 'Shortcut' for the common case, making its scoped purpose clear.

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?

Provides clear context for when to use it: 'Shortcut for the common case: bill one client for N hours at an hourly rate.' It also notes the conversion behavior when fx_rates is provided. It falls short of explicitly naming alternatives or saying when not to use it, but the context strongly implies its intended niche.

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