Skip to main content
Glama

Mercoa MCP by usefulapi

Get entity invoice metrics

mercoa_get_entity_invoice_metrics
Read-only

Get aggregate invoice metrics (totals/counts, grouped by currency) for an entity's payables/receivables — for AP/AR dashboards and aging. GET /entity/{entityId}/invoice-metrics.

Input Schema

NameRequiredDescriptionDefault
searchNoSearch by vendor name, invoice number, check number, or amount.
statusNoInvoice status filter (e.g. NEW, SCHEDULED, PAID).
endDateNoEnd date filter (ISO 8601).
groupByNoAdditional grouping (e.g. by status).
payerIdNoFilter by payer ID(s).
currencyNoCurrency code(s) to filter on, e.g. USD.
dateTypeNoDate type to filter by (e.g. CREATED_AT, DUE_DATE).
entityIdYesEntity ID or foreign ID.
vendorIdNoFilter by vendor ID(s).
invoiceIdNoFilter by invoice ID(s) or foreign ID(s).
startDateNoStart date filter (ISO 8601).
approverIdNoFilter by assigned approver user ID(s).
returnByDateNoGroup metrics by date, e.g. CREATION_DATE or DUE_DATE.
excludePayablesNoOnly return receivables (exclude payables).
excludeReceivablesNoOnly return payables (exclude receivables).
returnByDateFrequencyNoFrequency for date grouping (e.g. DAILY, MONTHLY).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

readOnlyHint=true already covers the safety profile, and the description usefully adds that results are aggregated by currency and split across payables/receivables. It says nothing about pagination, result size, or how the currency grouping interacts with the groupBy/returnByDate parameters, so context beyond the annotation is thin.

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?

One compact sentence that front-loads the payload (aggregate metrics, grouping, entity scope) before the supporting context. The trailing 'GET /entity/{entityId}/invoice-metrics' restates what the name and required entityId already convey, which is minor redundancy.

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?

For a read-only aggregation tool with 16 well-documented parameters and no output schema, the description conveys the shape of the result (totals/counts grouped by currency, split by payables/receivables) adequately. It could say more about how date/grouping parameters reshape the aggregate, but nothing essential to calling it is missing.

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% across all 16 parameters, so the schema already carries the semantics for search, status, dateType, groupBy, returnByDate, excludePayables/Receivables, etc. The description adds only the currency grouping notion, which is baseline behavior when the schema does the heavy lifting.

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?

States a specific verb (Get) plus a precisely scoped resource: aggregate invoice metrics with totals/counts grouped by currency for an entity's payables/receivables. The word 'aggregate' and the grouping qualifier cleanly separate it from sibling detail/list tools such as mercoa_find_invoices and mercoa_get_invoice.

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?

Gives an explicit use context ('for AP/AR dashboards and aging') that tells the agent when this aggregate tool is the right pick over invoice listing tools. It stops short of naming an alternative or stating when not to use it, so it does not reach the top band.

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.