Skip to main content
Glama

Товары с сортировкой

grocery_rank
Read-onlyIdempotent

Rank grocery items for a query by price, weight, calories, protein, fat, or carbs. Specify sort_by and order to control the result; entries with missing data are always placed last.

Instructions

Кандидаты по запросу с атрибутами, опционально отсортированные.

Это ИНСТРУМЕНТ, а не политика: сам по себе никакой стратегии выбора не применяет. Стратегию задаёт вызывающий, и только когда пользователь её попросил — иначе sort_by пустой и порядок остаётся магазинным.

sort_by: price | weight | kcal | kcal_pack | protein | fat | carb (пусто = без сортировки). order: asc | desc. Питательные поля тянутся автоматически, если по ним сортируем (это +1 запрос на кандидата), либо по with_nutrition=True. Товары, у которых сеть не публикует нужное поле, всегда уходят в конец — и при asc, и при desc: «нет данных» не равно нулю.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
orderNoasc
queryYes
app_idNo
sort_byNo
point_idNo
with_nutritionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the readOnly and idempotent annotations, it discloses meaningful behavior: no ranking strategy is applied by default, items missing a required sort field are placed last regardless of asc/desc, and fetching nutrition fields by sorting incurs an extra request per candidate. This gives the agent insight into actual runtime semantics and cost.

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?

The description is front-loaded with the purpose and then expands into tightly-packed details: when sorting is inactive, allowed sort values, order values, nutrition-fetch behavior, and missing-data behavior. Every sentence adds a distinct fact; there is no filler or redundancy.

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?

Together with the output schema, annotations, and title, this description is enough for the agent to invoke the tool correctly and interpret most runtime behavior. It clearly explains sorting, missing-data ordering, and fetch-related side effects. The remaining gap is the under-documentation of app_id, point_id, and limit, which would make the context fully self-contained.

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?

Given the input schema has no parameter descriptions, this description adds meaningful semantics for the most important parameters: sort_by values, order asc/desc, the meaning of empty sort_by, and the with_nutrition behavior. Still, not every parameter is covered: point_id, app_id, and limit are left completely unexplained, so the compensation is strong but not complete.

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?

The description clearly states that the tool returns query candidates with attributes and optional sorting, and it disambiguates itself as an 'instrument, not a policy.' The resource is identifiable from the title and name, but the description does not explicitly differentiate it from sibling tools like grocery_search, so it is clear but not fully sibling-aware.

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?

The description gives concrete guidance on when sorting should be applied: only when the caller/user requests a strategy, otherwise sort_by should stay empty and store order is preserved. It also explains when nutrition fields are fetched automatically versus via with_nutrition=True. However, it does not explicitly state when to choose this over alternative tools such as grocery_search, so it provides context without a clear exclusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icyberdeveloper/tbank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server