Skip to main content
Glama
tillbooks

tillbooks

Official

inventory_valuation_layers

Read-only

Get an item's remaining FIFO cost layers, oldest first: receipt date, source movement, original/remaining quantities, unit cost, total value, and shortfall. Filter by location.

Instructions

The remaining FIFO cost layers for one item, oldest first: each carries the receipt date, the source movement, the quantity originally received and what is left of it, and its unit cost. Layers are derived from the J02 ledger on demand rather than cached, so they cannot drift from it. Returns the layer quantity, the exact total (the sum of remaining qty times layer cost, to the Rappen) and shortfall, the demand that outlived the layers when stock went short. Filter by locationId to inspect one location; a foreign or unknown item OR location is not_found, never cross-tenant data and never an empty list that would read as "this location holds nothing". NOT A STOCK-AGEING REPORT: when stock is transferred the layer moves with its own unit cost but its receiptDate becomes the date it reached that location, because that is what drives consumption order there. For how long goods have really been held, read the J02 movement history, which rewrites nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asOfNo
itemIdYes
locationIdNo
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Despite readOnlyHint=true covering the safety profile, the description adds rich behavioral context beyond the annotation: layers are derived on demand rather than cached so they cannot drift; the exact total is computed to the Rappen; shortfall semantics are explained; error behavior is disclosed (foreign/unknown item or location is not_found, never cross-tenant data, never an empty list); and the subtle receiptDate rewrite on transfer is explained. This is exemplary disclosure of non-obvious behavior.

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?

The description is long but information-dense; every sentence carries a distinct point: scope/ordering, layer fields, derivation freshness, return values, error behavior, and the critical counter-indication. The 'NOT A STOCK-AGEING REPORT' warning is prominently placed. There is minor redundancy between 'derived... on demand rather than cached' and 'which rewrites nothing' at the end, but overall the structure is efficient and well 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?

Despite lacking an output schema and having 0% parameter coverage, the description covers return values (layer quantity, exact total, shortfall), error semantics, data derivation freshness, and the receiptDate caveat that materially affects interpretation of results. The main shortfall is the unexplained asOf parameter for a tool whose entire purpose is point-in-time layer state. Minor gap, otherwise complete.

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?

With 0% schema description coverage, the description must compensate. It does add meaning for locationId (filter scope and not_found behavior) and implies itemId scope ('for one item'). However, the asOf parameter is never explained — particularly important for an on-demand ledger-derived report — and workspaceId is left implicit. The description partially compensates but leaves a material gap.

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 opens with a specific verb+resource: 'The remaining FIFO cost layers for one item, oldest first' — stating exactly what is returned, the scope (one item), and the ordering. It further distinguishes itself by explicitly declaring 'NOT A STOCK-AGEING REPORT', making it unmissable that this is not an ageing report and is instead a layer valuation tool.

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?

The description gives explicit when-to-use guidance: filter by locationId to inspect one location, and explicitly routes the agent away from this tool when the question is about true holding time ('For how long goods have really been held, read the J02 movement history'). The NOT A STOCK-AGEING REPORT declaration plus the receiptDate mutation caveat tells the agent which alternative to reach for.

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

Deploy Server

Other Tools