Skip to main content
Glama
Metrx MCP Server

Metrx MCP Server

by metrxbots

Check Vendor Bill

metrx_check_vendor_bill
Read-onlyIdempotent

Reconcile an AI vendor's per-resolution bill against your ledger to identify billed units marked resolved, rejected, reopened, uncovered, or unknown and calculate the disputed amount.

Instructions

Reconcile an AI vendor's per-resolution bill against your own records: which billed units your ledger shows as resolved, rejected, reopened, outside coverage, or unknown, and the disputed amount. A pure function over the lines you pass: reads nothing, stores nothing, needs no key. Paste the bill lines and your ledger events.

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": {
      "period": "<period>",
      "billed": "<billed>"
    },
    "name": "metrx_check_vendor_bill"
  }
}

Input Schema

NameRequiredDescriptionDefault
billedYesThe vendor's bill lines for the period.
ledgerNoEvery ledger event you hold for the vendor (reopens after the period still dispute).
periodYesThe billing period (from < to).
rejected_idsNoExternal ids your records show as rejected (a person overturned it).
resolved_idsNoExternal ids your records show as resolved by the agent.
covered_spansNoThe spans your records cover; omitted = nothing is covered.
import_rejected_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds value beyond them by stating the tool reads nothing, stores nothing, and requires no API key, which is useful auth/state information an agent would otherwise have to guess. It could still say more about output shape or determinism, but the key behavioral claims are present and consistent with the 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?

Three short sentences: purpose and output categories first, behavioral guarantees second, and the call-to-action (paste inputs) last. No filler, no restatement of the title, and the most decision-relevant information 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?

For a 7-parameter tool with nested objects and no output schema, the description does the important work of enumerating return categories and stating the no-side-effect model. Gaps remain around the uncovered import_rejected_count parameter and the precise meaning of covered spans, but nothing critical to invoking the tool correctly is absent.

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 86%, so the baseline would be 3; the description earns a bump by tying inputs to outputs, explaining that paste of bill lines plus ledger events (and implicitly the resolved/rejected/coverage sets) drives the classification into the five buckets. It does not explain the import_rejected_count parameter or the from<to period constraint, so it falls short of fully complementing the schema.

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 (reconcile) and resource (a vendor's per-resolution bill against your own records), then enumerates the outcome buckets it returns: resolved, rejected, reopened, outside coverage, unknown, plus disputed amount. That is far more informative than the title and lets an agent distinguish it from the read-only metrx_get_* siblings at a glance.

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 concrete invocation context: you supply the bill lines and ledger events, and the tool does the matching. It also clarifies the boundary condition that this is a pure function needing no key, so it can be called without setup. It does not name an alternative or state when not to use it, but among the listed siblings none is a plausible substitute for bill reconciliation.

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