Skip to main content
Glama

Listing analytics

items_post_item_analytics
Read-onlyIdempotent

Fetch extended listing metrics (views, contacts, presenceSpending) with flexible grouping, category/employee filters, and metric sorting for in-depth performance analysis.

Instructions

Returns EXTENDED statistical metrics for the profile/listings over a period (post_item_analytics, stats v2): views, contacts, presenceSpending, etc. with flexible grouping, filters and sorting. Read-only analytics. Choose it over items_post_item_stats_shallow when you need filters by category/employee, sorting by a metric, or presence-spending metrics. limit ≤ 1000.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSorting of results: key — the metric name, order — asc (ascending) or desc (descending).
limitYesMaximum number of rows in the response (0..1000) for pagination.
dateToYesEnd of the period, inclusive (YYYY-MM-DD).
filterNoSelection filters: categoryIDs — an array of category IDs, employeeIDs — an array of employee IDs. Without the filter — the entire profile.
offsetYesOffset from the start of the selection for pagination (>= 0).
metricsYesList of requested metrics (at least 1): views, contacts, presenceSpending, etc.
user_idNoID of the owner user. Defaults to Profile_id from .env.
dateFromYesStart of the period, inclusive (YYYY-MM-DD).
groupingYesHow to group metrics: day, week, month, item, or totals.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.0
    • removedInput schema / properties / grouping / additionalProperties
      Removed value: -{}
    • changedInput schema / properties / grouping / description
      Previous value: -"How to group the metrics: period (day|week|month), itemId (by listing) and/or by category. An empty object — overall totals."New value: +"How to group metrics: day, week, month, item, or totals."
    • addedInput schema / properties / grouping / enum
      Added value: +[
      +  "day",
      +  "week",
      +  "month",
      +  "item",
      +  "totals"
      +]
    • removedInput schema / properties / grouping / properties
      Removed value: -{
      -  "itemId": {
      -    "type": "boolean"
      -  },
      -  "period": {
      -    "enum": [
      -      "day",
      -      "week",
      -      "month"
      -    ],
      -    "type": "string"
      -  }
      -}
    • changedInput schema / properties / grouping / type
      Previous value: -"object"New value: +"string"
  2. Changed9 schema fields changedv0.8.0
    • changedInput schema / properties / dateFrom / description
      Previous value: -"Начало периода (YYYY-MM-DD)."New value: +"Start of the period, inclusive (YYYY-MM-DD)."
    • changedInput schema / properties / dateTo / description
      Previous value: -"Конец периода (YYYY-MM-DD)."New value: +"End of the period, inclusive (YYYY-MM-DD)."
    • changedInput schema / properties / filter / description
      Previous value: -"Фильтры по категориям/сотрудникам."New value: +"Selection filters: categoryIDs — an array of category IDs, employeeIDs — an array of employee IDs. Without the filter — the entire profile."
    • changedInput schema / properties / grouping / description
      Previous value: -"Группировка: по периоду/объявлению/категории."New value: +"How to group the metrics: period (day|week|month), itemId (by listing) and/or by category. An empty object — overall totals."
    • changedInput schema / properties / limit / description
      Previous value: -"Сколько строк вернуть (0..1000)."New value: +"Maximum number of rows in the response (0..1000) for pagination."
    • changedInput schema / properties / metrics / description
      Previous value: -"Список метрик: views, contacts, presenceSpending, и др."New value: +"List of requested metrics (at least 1): views, contacts, presenceSpending, etc."
    • changedInput schema / properties / offset / description
      Previous value: -"Смещение пагинации."New value: +"Offset from the start of the selection for pagination (>= 0)."
    • changedInput schema / properties / sort / description
      Previous value: -"Сортировка по метрике."New value: +"Sorting of results: key — the metric name, order — asc (ascending) or desc (descending)."
    • changedInput schema / properties / user_id / description
      Previous value: -"По умолчанию — Profile_id из .env."New value: +"ID of the owner user. Defaults to Profile_id from .env."
  3. First observedv0.7.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds context by stating 'Read-only analytics' and specifying that it returns extended statistical metrics with flexible grouping, filters, and sorting, plus the limit constraint. This adds value beyond annotations, though it could further describe the output structure.

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?

Two sentences with high information density: first sentence states purpose and key features, second sentence provides usage guidance. No unnecessary words, front-loaded with core purpose.

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?

For a tool with 9 params, 6 required, no output schema, and annotations present, the description covers purpose, usage guidance, key constraints, and differentiator. It lacks details on output format but is largely complete given the schema and annotations.

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% with detailed descriptions for each parameter. The description briefly summarizes key parameters (grouping, filters, sorting, metrics) and mentions limit ≤ 1000, but adds limited new meaning beyond the schema. Baseline 3 is appropriate.

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?

Clearly states the tool returns extended statistical metrics for profile/listings over a period, with examples (views, contacts, presenceSpending). The title 'Listing analytics' reinforces the resource, and it distinguishes from the sibling items_post_item_stats_shallow by specifying advanced capabilities like filters and sorting.

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?

Explicitly advises when to use this tool over items_post_item_stats_shallow: when filters by category/employee, sorting by a metric, or presence-spending metrics are needed. Also mentions limit ≤ 1000, providing clear guidance.

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