Skip to main content
Glama

Zahlung erfassen

record_payment

Records incoming tenant payments in NebenkostenFix, checks for duplicates, and prompts for confirmation when a statement link or amount is missing or mismatched.

Instructions

Legt in NebenkostenFix eine eingegangene Zahlung eines Mieters an (schreibt, ändert nichts Bestehendes). Gibt es dieselbe Zahlung schon, wird vorher nachgefragt. Eine Nachzahlung gehört an ihre Abrechnung (statement_id); fehlt sie oder weicht der Betrag vom offenen Betrag ab, wird nachgefragt.

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": {
      "tenant_id": "<tenant_id>",
      "amount": "<amount>",
      "payment_date": "<payment_date>",
      "payment_type": "<payment_type>"
    },
    "name": "record_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesBetrag in Euro mit höchstens zwei Nachkommastellen, z. B. "1500.00" oder "1.500,00"
tenant_idYesID des Mieters, siehe Werkzeug list_tenants
payment_dateYesZahlungseingang, YYYY-MM-DD
payment_typeYesMiete: Kaltmiete. Nebenkostenvorauszahlung: der monatliche NK-Abschlag; eine Warmmiete teilst du in beide auf (Soll siehe get_advance_payment_status). Nebenkostenzahlung: Nachzahlung auf eine Abrechnung oder Guthabenauszahlung negativ, jeweils mit statement_id. Kaution: Mietsicherheit.
statement_idNoAbrechnung, auf die diese Nachzahlung (oder ein ausgezahltes Guthaben, negativ) geht, siehe list_statements. Nur bei Nebenkostenzahlung; ohne sie zählt die Zahlung in der Abrechnung nicht als bezahlt.
approval_codeNoFreigabecode aus einer vorigen Antwort mit saved=false. Nur mitschicken, nachdem du dem Menschen die Bedenken gezeigt hast und er dem Speichern ausdrücklich zugestimmt hat. Nie vorab und nie von dir aus.

Output Schema

NameRequiredDescriptionDefault
idYesID des neuen Eintrags
noteYes
savedYes
concernsYeswas gegen das Speichern sprach (auch wenn trotzdem gespeichert wurde)
approval_codeNoCode für den zweiten Aufruf, falls der Mensch trotz der Bedenken speichern will

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only say it writes, is not idempotent and is not destructive; the description adds the important behavioral trait that duplicate payments trigger a confirmation prompt instead of silently double-booking. It also warns that a Nebenkostenzahlung without statement_id simply will not count as paid in the statement, which is a real side effect an agent could not infer from annotations.

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?

Three compact sentences, front-loaded with what the tool does before moving to the conditional rules. The parenthetical and the clause chaining make it slightly dense but nothing is redundant.

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 financial write tool with six parameters and a confirmation/approval-code flow, the description covers write scope, deduplication, and statement linkage, and an output schema exists so return values need not be explained. Only the escalation path for approval_code is left entirely to the schema.

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 coverage is 100%, with tenant_id, payment_type, statement_id and approval_code all documented in detail, so the schema already carries the parameter burden. The description echoes the statement_id dependency but adds no syntax or format meaning beyond it; the mismatch-on-amount rule is behavioral rather than parameter semantics.

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: it records an incoming tenant payment in NebenkostenFix, and it explicitly scopes the write as additive ("schreibt, ändert nichts Bestehendes"). That separates it implicitly from modification tools and from record_invoice/record_meter_reading by resource, though no sibling is named explicitly.

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 conditional rules rather than pure description: a Nachzahlung belongs to a statement (statement_id), and if that link is missing or the amount deviates from the open amount, the tool prompts before writing. What is absent is guidance on when to pick this over list_payments or record_invoice, so it is clear context without explicit alternatives.

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