Skip to main content
Glama

Bestand buchen

material_buchen
Destructive

Bucht eine Bestandsbewegung auf einem Katalogartikel: Zugang (Einkauf), Abgang (Entnahme ohne Auftrag) oder Inventur (Korrektur auf einen gezählten Ist-Bestand). Jede Buchung wird dauerhaft protokolliert und lässt sich NICHT löschen — ein Fehler wird durch eine Gegenbuchung berichtigt, nicht durch Rückgängigmachen. Für Material, das auf einen Auftrag geht, ist „material_zuweisen" richtig: Das verbindet den Verbrauch mit dem Auftrag und macht ihn abrechenbar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artYeszugang = Ware kommt herein · abgang = Ware geht ohne Auftrag heraus · inventur = der gezählte Ist-Bestand, NICHT die Differenz.
mengeYesBei Zugang und Abgang die bewegte Menge (immer positiv). Bei Inventur der gezählte Bestand — die Differenz errechnet das System selbst.
notizNoGrund der Buchung, z. B. Lieferschein-Nummer.
material_idYesDie Kennung des Artikels.
idempotency_keyNoIm vollautonomen Betrieb erforderlich. Beim ersten Aufruf weglassen: Der Server liefert dann einen UUID-Key, ohne die Aktion auszuführen. Den Aufruf mit diesem Key wiederholen und bei Retry/Reconnect denselben Key verwenden. Eine neue beabsichtigte Aktion braucht einen neuen Key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Im vollautonomen Betrieb erforderlich. Beim ersten Aufruf weglassen: Der Server liefert dann einen UUID-Key, ohne die Aktion auszuführen. Den Aufruf mit diesem Key wiederholen und bei Retry/Reconnect denselben Key verwenden. Eine neue beabsichtigte Aktion braucht einen neuen Key.",
      +  "format": "uuid",
      +  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already mark destructiveHint=true and idempotentHint=false, and the description reinforces this with concrete operational context: every posting is permanently logged, cannot be deleted, and errors are corrected by a reversing posting rather than an undo. This goes beyond the generic annotation and is directly actionable for an agent.

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 sentences, each earning its place: the first explains the core operation and variants, the second adds the critical irreversibility/correction behavior, and the third routes to the correct alternative for a different case. The most important information is front-loaded and there is no fluff.

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 mutation tool with no output schema, the description covers the purpose, all three variants, the permanence/correction model, and the sibling alternative. The idempotency_key flow is fully described in the schema, so its absence from the description is not a gap. A minor gap is that the return/confirmation shape is not mentioned, but this is not a serious omission given how well the rest is covered.

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%, and the schema already documents all five parameters in detail, including the subtle idempotency_key handshake. The tool description adds only a light interpretive layer for the movement types, not parameter-level semantics beyond the schema, so the baseline of 3 is appropriate.

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 states a precise verb ('Bucht') and a clear resource ('Bestandsbewegung auf einem Katalogartikel'), then enumerates the three movement types: Zugang, Abgang and Inventur. It also distinguishes itself from material_zuweisen, so an agent can tell exactly what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance: this tool is for stock movements on a catalog item. It also names the sibling alternative and the condition that selects it: material that goes to an order should use material_zuweisen, because that links consumption with the order and makes it billable.

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.

Resources