Skip to main content
Glama
burakOzden1

ERP MCP Server

by burakOzden1

Business KPIs

get_kpi
Read-onlyIdempotent

Calculate a business KPI (revenue, top products or customers, average order value, overdue receivables) for a date range, optionally compared with the previous equivalent period.

Instructions

Calculate a business KPI for a date range from a fixed list of metrics.

Use for "How did revenue this quarter compare to last quarter?", "Top 5 products last month", "Average order value in 2026" or "How much is overdue?". Example: metric='revenue', period_start='2026-10-01', period_end='2026-12-31', compare_previous=true. Partial periods include a like-for-like comparison.

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of items for top_* metrics.
metricYesrevenue = invoiced sales; top_products / top_customers = ranking by revenue; avg_order_value = revenue per invoiced order; overdue_receivables = unpaid past-due invoices as of period_end, with aging buckets.
period_endYesLast day of the period, YYYY-MM-DD (inclusive).
period_startYesFirst day of the period, YYYY-MM-DD.
compare_previousNoAlso return the previous period and % change. Calendar months, quarters and years compare with the previous calendar month/quarter/year; other ranges with the same-length window before.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the safety profile is covered. The description adds a real behavioral trait not in the annotations: partial periods produce a like-for-like comparison, which affects how results should be interpreted. It does not mention data freshness or latency, which keeps it below 5.

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 short paragraphs: purpose, then intent examples, then a concrete invocation with the partial-period caveat. Every sentence carries information and the most decision-relevant content is front-loaded.

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?

An output schema exists, so return values need no explanation, and the description covers the metric list restriction, date-range framing, comparison behavior, and concrete intents. What remains thin is guidance on choosing between the ranking metrics and the per-entity siblings such as list_overdue_orders.

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%, including detailed enum value meanings for metric and the comparison-window rules for compare_previous, so the baseline is 3. The description repeats those same fields in its example call without adding syntax or constraints beyond the schema; only 'fixed list of metrics' lightly reinforces the enum.

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?

States a specific verb and resource ('Calculate a business KPI for a date range') and scopes it to 'a fixed list of metrics', which signals the enum. It implicitly separates itself from per-record siblings like get_order_status or get_customer_balance by framing this as aggregate reporting, but never names a sibling, so differentiation is by inference.

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?

The three example questions ('How did revenue this quarter compare to last quarter?', 'Top 5 products last month', 'How much is overdue?') effectively map natural-language intents onto specific metrics, which is strong routing guidance. It lacks any explicit when-not or prerequisite statement, so it stops short of the top band.

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