Skip to main content
Glama
lexware-php-mcp

lexware-php-mcp

Revenue (invoices minus credit notes)

revenue
Read-onlyIdempotent

Calculates net sales (invoices minus credit notes) for a voucher date range in Lexware Office, per currency with tax and gross; optionally groups totals by month.

Instructions

Net revenue (invoices minus credit notes) of a voucher date range from Lexware Office, per currency, with tax and gross. Reads one voucher detail per voucher (cached); at most 100 detail requests per call, larger ranges return complete=false and coveredUntil for a follow-up call. groupBy=month adds totals per calendar month.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dateFrom": "<dateFrom>",
      "dateTo": "<dateTo>"
    },
    "name": "revenue"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateToYesLast voucher date (inclusive) as YYYY-MM-DD, at most 366 days after dateFrom.
groupByNoGrouping of the result: none (default) or month, which adds totals per calendar month.none
dateFromYesFirst voucher date (inclusive) as YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses the internal cost model (one voucher-detail read each, cached) and, critically, the truncation contract: at most 100 detail requests, with complete=false and coveredUntil signaling incomplete results. That is exactly the kind of behavior an agent cannot infer from annotations or schema and needs in order to interpret results correctly.

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?

Three sentences, front-loaded with the metric definition, then the cost/truncation behavior, then the grouping option. No filler and no repetition of the schema's date-format details.

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?

With no output schema, the description still conveys the key return contract: values broken out per currency with tax and gross, plus the complete/coveredUntil truncation fields. It stops short of naming the actual result field names, so an agent must inspect the response to learn exact keys, but the important semantics are present.

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 dateFrom, dateTo, and groupBy including the 366-day constraint and the enum values. The description restates groupBy=month semantics ('adds totals per calendar month') without adding new meaning, 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 description names a specific computed metric with its formula ('net revenue (invoices minus credit notes)'), the source system, the dimension ('per currency'), and the breakdown ('with tax and gross'). This clearly separates it from siblings like search_vouchers or voucher_detail, which return individual records rather than an aggregate.

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 clear operational context: one detail read per voucher, a hard cap of 100 detail requests per call, and an explicit follow-up path via complete=false/coveredUntil for larger ranges. It does not explicitly name alternatives or state when to prefer list-style tools such as search_vouchers, so a 4 rather than a 5.

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