Skip to main content
Glama

Query stock for sale

query_stock
Read-onlyIdempotent

What is still for sale: boxes on live shipments, on the water or landed, that are not pre-allocated, from the packing lists, grouped by produce and calibre (size) like the Trading View. Use it for "how many size 14 avocados are unallocated in Rotterdam", "what can we still sell arriving next week" or "which mango sizes are left with QC 7 or better". available_boxes is what can be sold; allocated_boxes is already pre-allocated. in_transit_boxes and arrived_boxes split the available boxes by where the shipment is. qc_score is the box-weighted average of the 1-9 inspection scores (9 excellent, 6 acceptable, 1 discard) over the scored available boxes; qc_scored_boxes says how many have one. min_qc_score keeps only pallets whose own score meets it, and excluded then counts the available boxes dropped for having no score or a lower one: say so when they are many, since an uninspected container is not missing stock. Archived shipments are not counted. Each row lists its shipments with container_numbers: name a shipment by its container number and link it to its shipment_url, never a made-up URL. Calibres are compared as packers write them once normalised ("14", "12+", "113"); pass them as strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arrivalNo"in_transit" for on the water, "arrived" for landed (including in warehouse), "in_warehouse" for received at the warehouse only, "any" (default) for all.any
produceNoOnly this produce, such as "avocado". Plural is fine.
varietyNoOnly this variety, such as "Hass".
calibresNoOnly these calibres (sizes or counts), such as ["14", "16"].
group_byNoHow to split the rows. Produce always comes first. Default: ["produce", "calibre"].
destinationNoOnly shipments to this port or country, such as "Rotterdam" or "Netherlands".
min_qc_scoreNoOnly pallets whose latest QC score is at least this, 1 to 9.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description goes well beyond them: it explains what available/allocated/in_transit/arrived mean, how min_qc_score filters pallets and how `excluded` counts dropped boxes, that archived shipments are excluded, and how container numbers and shipment URLs should be used. This is exactly the extra behavioral context annotations cannot carry.

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?

Deliberately front-loaded with the purpose before the field-by-field semantics, and most sentences earn their place. It is dense and long, though — output-field explanation is interleaved with filtering guidance rather than separated, which slightly reduces scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must describe what comes back, and it does: available_boxes, allocated_boxes, in_transit_boxes, arrived_boxes, qc_score, qc_scored_boxes, min_qc_score/excluded, container_numbers and shipment_url. An agent has enough to call the tool and interpret the result correctly.

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 100% so the baseline is 3, but the description adds real meaning: it clarifies min_qc_score semantics (pallet's own score, with a separate `excluded` count), the string-normalisation rule for calibres ("14", "12+", "113"), and the sale-relevance of the arrival buckets. That is more than restating 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 precise verb+resource with an explicit scope definition: boxes on live shipments, on the water or landed, not pre-allocated, grouped by produce and calibre. This is specific enough that an agent can tell it apart from shipment/document tools like search_shipments or get_shipment without opening any 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?

Gives three concrete example questions that map directly onto the tool (unallocated size 14 avocados in Rotterdam, what can be sold arriving next week, mango sizes with QC 7+), which is strong positive routing. It does not, however, name an alternative tool or state when NOT to use it, so it stops short of a 5.

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