Skip to main content
Glama
ime-mcp

ime-mcp

by sepehr071

Trade statistics by group

ime_trade_stats
Read-onlyIdempotent

Rank producers, commodities, brokers, or halls by traded value over a date range and return each group's market share.

Instructions

Rank producers, commodities, brokers or halls by traded value over a date range, with each one's market share.

Dates default to today (Tehran); at most 45 days; filters as in ime_trades. Value is thousand Rial. volume only when all trades of the group share one unit. For single trades use ime_trades.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "group_by": "<group_by>"
    },
    "name": "ime_trade_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
catNoCategory id from ime_categories (0 = all).
limitNoMax groups to return (1-50).
marketNophysical, subsidiary (بازار فرعی), export (Kish hall) or premium (no producer filter).physical
searchNoCommodity, symbol or producer contains this text.
date_toNoPersian 1405/08/09 or Gregorian 2026-10-31.
sub_catNoCategory id from ime_categories (0 = all).
group_byYesGrouping key (broker = buyer broker).
main_catNoCategory id from ime_categories (0 = all).
producerNoCategory id from ime_categories (0 = all).
date_fromNoPersian 1405/08/09 or Gregorian 2026-10-31.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.2.0
    • changedInput schema / properties / date_from / description
      Previous value: -"Persian date 1405/08/09 or Gregorian 2026-10-31 (Persian digits are fine)."New value: +"Persian 1405/08/09 or Gregorian 2026-10-31."
    • changedInput schema / properties / date_to / description
      Previous value: -"Persian date 1405/08/09 or Gregorian 2026-10-31 (Persian digits are fine)."New value: +"Persian 1405/08/09 or Gregorian 2026-10-31."
    • changedInput schema / properties / group_by / description
      Previous value: -"Rank trades by producer, commodity, buyer broker, hall or contract type."New value: +"Grouping key (broker = buyer broker)."
    • changedInput schema / properties / market / description
      Previous value: -"physical (main physical market halls), subsidiary (بازار فرعی, secondary market), export (Kish export hall) or premium (پریمیوم contracts; no producer filter)."New value: +"physical, subsidiary (بازار فرعی), export (Kish hall) or premium (no producer filter)."
    • changedInput schema / properties / search / description
      Previous value: -"Keep trades whose commodity, symbol or producer contains this text."New value: +"Commodity, symbol or producer contains this text."
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real value on top: dates default to today in Tehran, the range is capped at 45 days, values are in thousand Rial, and volume is only reported when all trades in a group share one unit. It says nothing about result ordering, tie-breaking, or how market share is computed (value vs volume).

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, front-loaded with the core ranking behavior, followed by constraints and then the disambiguation to the alternative tool. No filler and nothing buried.

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 description carries the burden of explaining returns and does explain that output is a ranked list with market share in thousand Rial. The date-window and volume caveats fill the gaps annotations cannot cover. Only the unmentioned 'contract' grouping and the undefined share calculation keep it from being 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?

Schema coverage is 100%, so every parameter is already documented, giving a baseline of 3. The description contributes cross-cutting semantics not in the schema (Rial-thousand units, the volume single-unit caveat, the 45-day window) but adds nothing per-parameter beyond the 'filters as in ime_trades' pointer.

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 opens with a specific verb+resource: ranks producers, commodities, brokers or halls by traded value over a date range, plus market share per group. It is clearly distinguishable from the sibling ime_trades (single trades). Minor deduction: group_by also accepts 'contract', which the enumeration omits, so an agent could wrongly conclude contracts cannot be ranked.

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?

It explicitly routes single-trade lookups to ime_trades and says the filters mirror that tool, which is concrete sibling guidance. It also gives the default date window and the 45-day cap, so the agent knows the boundaries. No explicit statement of what kind of question this tool should not answer beyond the single-trade case.

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