Skip to main content
Glama

freelance-invoice

Invoice from hours

invoice_from_hours

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 observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations only provide false hints, so the description carries the burden. It discloses the create side effect and adds useful behavioral details: rate conversion when fx_rates is supplied and echoing back entry_ids. However, it omits broader side effects, return shape specifics, or prerequisites beyond what the schema implies.

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 tight sentences front-load the core purpose and then add the most important behavioral nuances. No filler or redundant restatement of the tool name or schema.

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

Completeness3/5

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

Given 14 parameters, nested objects, no output schema, and sparse annotations, the description provides only a minimal working picture. It covers the common-case invocation and key conversion/echo behavior, but an agent lacks guidance on return format and the many optional parameters that affect invoice output.

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 coverage is only 50%, and the description compensates partially by explaining the roles of target_currency, fx_rates, and entry_ids. It also implies the required client/hours/rate relationship. But many optional parameters (tax_rate, due_days, discount_percent, notes, etc.) receive no semantic guidance here or in the schema.

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?

The description clearly states the tool's purpose with a specific verb ('Creates'), the resource (a single-line invoice), and the exact business scenario (billing one client for N hours at an hourly rate). It is more specific than the generic sibling invoice_create, though it does not explicitly name that sibling as the alternative.

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?

'Shortcut for the common case' establishes a clear usage context: use this when a simple time-based invoice is needed. It does not state exclusions or explicitly compare against invoice_create, but the common-case framing is enough to guide an agent.

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.