Skip to main content
Glama

fynsight: MCP server for DATEV

aggregate_pnl_by_cost_center

Read-only

P&L metrics per cost center and period across the full history, paginated. revenue is the sum of ALL labels in the tenant's revenue group — sales deductions and penalties booked on revenue-group labels are already netted in; with include_categories=true you see the split per label (category_totals, result effect: revenue +, expense −), and revenue is then the sum of the revenue-group categories. Pages losslessly over cost_center via after_cost_center/next_cursor (with categories each row counts several times against the page budget; the response states the weight). Use available_range to state the overall time range; never claim 'no data' when available_range says otherwise. For yearly/quarterly figures (e.g. 'EBIT per year per cost center') set granularity — the tool then returns the finished yearly figure instead of you adding up monthly values. Hidden cost centers stay included and are marked as hidden on each row. If the user names a cost center (e.g. "Betriebsrat"), call get_cost_center_list FIRST to resolve its number; never guess the number.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "aggregate_pnl_by_cost_center"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricsNoWhich metrics to return (default: all six)
period_toNoEnd period YYYY-MM (optional)
granularityNoTime bucket of the returned figures: 'month' (default), 'quarter', 'year' or 'total'. Set this whenever the answer needs a figure covering more than one month — never add the monthly values up yourself.
period_fromNoStart period YYYY-MM (optional)
cost_centersNoOptional cost center ID filter
after_cost_centerNoPagination cursor: pass pagination.next_cursor from the previous call to fetch the next page
include_categoriesNoDefault false. true = each row also carries category_totals (label name → value, revenue +, expense −), category_label_ids (name → ids of the labels summed into it) and category_totals_sort_order. Fewer cost centers fit on a page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description goes much further, disclosing that revenue is netted across the whole revenue group, how categories change the revenue definition, that paging is lossless over after_cost_center with a page-weight penalty when categories are included, and that hidden cost centers remain in results and are flagged per row. This is exactly the behavioral context annotations cannot express.

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?

It is front-loaded with the core operation and every clause carries information, but the single dense paragraph packs several distinct topics (revenue netting, paging weight, available_range, granularity, hidden rows, cost-center resolution) without visual separation, making it harder to scan than it needs to be.

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?

With no output schema and seven optional parameters, the description compensates well by naming the concrete response fields an agent will see (available_range, next_cursor, category_totals, category_label_ids, hidden markers) and by explaining the page-weight mechanism. Nothing material for correct invocation or interpretation appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: granularity carries a rationale and a 'never add monthly values yourself' rule, include_categories is explained in terms of which extra fields appear and its page-budget cost, and after_cost_center is tied to pagination.next_cursor. The remaining parameters (metrics, period_from/to, cost_centers) get no added nuance beyond the schema, which keeps this from a 5.

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 opening sentence gives a specific verb (aggregate), resource (P&L metrics), and scope (per cost center and period, full history, paginated). It is clear what the tool returns, but it does not explicitly distinguish itself from sibling aggregators such as compute_aggregates or query_kpis, so an agent must infer the boundary from the metric list and grouping.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description names explicit preconditions and alternatives: resolve a named cost center via get_cost_center_list first and never guess the number; set granularity for yearly/quarterly answers instead of summing months; use available_range rather than declaring 'no data'. These are concrete when/when-not rules that steer invocation away from common failure modes.

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