Skip to main content
Glama
claygeo
by claygeo

Get inventory levels

distru_get_inventory
Read-only

Get on-hand inventory quantities aggregated by product, location, or batch number, with optional filters for products, locations, and SKUs. Use to check stock levels and support planning decisions.

Instructions

Get on-hand inventory rolled up by a chosen set of attributes (GET /public/v1/inventory). groupings is REQUIRED and must include PRODUCT. Each grouping adds its id field to every row: PRODUCT adds product_id, LOCATION adds location_id, BATCH_NUMBER adds batch_number; omitted groupings are absent from the rows entirely. Groups with zero quantity are omitted, and deactivated products are excluded. Grouping by BATCH_NUMBER drops product-tracked products and always reports reserved as "0". This data is eventually consistent: a write can take about a second to show up here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-indexed page number. Page size is not guaranteed stable; follow next_page instead.
groupingsYesAttributes to roll up by. Must include PRODUCT. Order sets the sort order.
product_idsNo
location_idsNo
product_skusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnlyHint/openWorldHint annotations: eventual consistency ('a write can take about a second to show up here'), omission of zero-quantity groups, exclusion of deactivated products, and the BATCH_NUMBER special cases (drops product-tracked products, always reports reserved as "0"). The readOnlyHint is consistent with the 'Get' verb, and no contradiction exists.

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?

Five dense sentences, front-loaded with purpose and the required-parameter constraint before the caveats. The grouping-to-id-field mapping, row omission rules, and consistency note are all load-bearing; there is no filler and no redundant restatement of the title or schema.

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?

With no output schema, the grouping-to-id-field mapping is essential and is provided, partially compensating for the missing return-value documentation. Remaining gaps are minor: the response envelope/pagination metadata and how the filter arrays compose with roll-ups are not described, and filter semantics rest on parameter names. For the tool's complexity, this is near-complete.

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 only 40% (page and groupings documented; product_ids, location_ids, and product_skus are bare arrays). The description compensates richly for the required groupings parameter by mapping each grouping to the id field it adds and explaining row-omission behavior, but the three filter arrays get no description-level semantics beyond their self-evident names. Net positive compensation for the critical parameter.

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 action on a specific resource — 'Get on-hand inventory rolled up by a chosen set of attributes' — and pins it to the explicit endpoint (GET /public/v1/inventory). The roll-up-by-groupings mechanic is unique among the siblings, which are all products, orders, invoices, and companies, so an agent can distinguish this tool 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 Guidelines4/5

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

Makes the valid usage envelope explicit: groupings is REQUIRED and must include PRODUCT, with per-grouping effects spelled out. It never names alternatives or when-not-to-use conditions, but the sibling tools are domain-disjoint resources, so selection is unambiguous. The operational constraints are concrete enough to prevent invalid calls.

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