Skip to main content
Glama
erp-mafia

Fortnox MCP Server

by erp-mafia

Top Customers Analytics

fortnox_top_customers
Read-onlyIdempotent

Rank customers by total revenue, invoice count, unpaid balance, or average invoice size for any period to identify your top clients.

Instructions

Identify top customers by various metrics.

Answers questions like:

  • "Who are my top 10 customers by revenue?"

  • "Which customers have the most invoices?"

  • "Who has the highest unpaid balance?"

  • "What's the average invoice size per customer?"

Args:

  • metric ('total_amount' | 'invoice_count' | 'unpaid_amount' | 'average_invoice'): How to rank customers (default: total_amount)

  • period ('today' | ... | 'last_year'): Date period to analyze

  • from_date (string): Start date YYYY-MM-DD (ignored if period specified)

  • to_date (string): End date YYYY-MM-DD (ignored if period specified)

  • top_n (number): Number of customers to return, 1-50 (default: 10)

  • include_details (boolean): Include invoice breakdown per customer (default: false)

  • response_format ('markdown' | 'json'): Output format

Returns: For JSON: { metric, period, customers: [{ rank, customer_number, customer_name, value, invoice_count, ... }] } For Markdown: Ranked table of top customers

Examples:

  • Top 10 by revenue this year: period="this_year", top_n=10

  • Customers with most unpaid: metric="unpaid_amount"

  • Top 5 by invoice count last month: metric="invoice_count", period="last_month", top_n=5

Error Handling:

  • Returns truncation warning if >10,000 invoices analyzed

  • Returns "Error: ..." if API call fails

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of top customers to return (1-50)
metricNoMetric to rank customers bytotal_amount
periodNoDate period to analyze (e.g., 'this_year', 'last_month')
to_dateNoEnd date for analysis (YYYY-MM-DD). Ignored if period is specified.
from_dateNoStart date for analysis (YYYY-MM-DD). Ignored if period is specified.
include_detailsNoInclude invoice breakdown for each customer
response_formatNoOutput format: 'markdown' or 'json'markdown
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses important behavioral details: it warns about truncation when over 10,000 invoices are analyzed, explains error handling ('Error: ...'), and specifies return formats for JSON and Markdown. This adds significant transparency beyond the structured annotations.

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?

The description is well-structured with a clear headline, example questions, Args list, Returns section, and Examples, all of which earn their place. It is appropriately detailed given the tool's complexity, and the front-loaded purpose makes it easy to scan.

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?

Given the tool has 7 parameters, no output schema, and sits among many analytics siblings, the description fully compensates by describing return values, providing multiple usage examples, and covering error conditions. It leaves no significant gaps for an agent to invoke the tool effectively.

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

Parameters5/5

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

The description enriches each parameter beyond the schema by listing them in a clear Args block with defaults and behavioral notes such as 'ignored if period specified'. It also provides examples showing parameter combinations, which the schema alone does not offer.

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 clearly states 'Identify top customers by various metrics' and provides concrete example questions that illustrate the tool's specific purpose of ranking customers. This distinguishes it from sibling tools like list_customers (which lists all customers) and customer_growth (which focuses on growth trends).

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 description gives clear context through example questions and parameters, effectively communicating when to use it (analytics on top customers). However, it does not explicitly mention when not to use it or name alternative tools for different analytics needs, so it falls short of the highest bar for explicit exclusions and alternatives.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/erp-mafia/fortnox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server