Skip to main content
Glama

get_statistics

Read-onlyIdempotent

Count HKEx filings grouped by company ticker, filing type, or sink. Apply date, ticker, and status filters to get breakdowns with top N buckets.

Instructions

Use this to count filings grouped by one dimension, or per sink.

Choose between: this tool gives a grouped breakdown of one population (or per-sink totals when group_by="sink"); get_coverage reports scrape coverage by month; verify_sinks compares across sinks. group_by is one of: company_ticker (default), filing_type, filing_category, document_status, exchange, or sink. Optional filters narrow the population and combine with AND semantics (a filing must match every filter you set); group_by="sink" honours only ticker, filing_type, filing_category, document_status, date_from, and date_to, and returns per-sink totals (relational sinks only). top_n caps the returned buckets and min_count drops small buckets, but total still counts every matching filing. Buckets are sorted by count descending. This tool is read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoMaximum buckets to return (1..200).
sourceNoSource of the filing, e.g. HKEx.
tickerNoCompany ticker filter, e.g. 0700.HK; comma-separate to match several.
date_toNoLatest filing date, YYYY-MM-DD inclusive.
exchangeNoExchange code, e.g. HK.
group_byNoDimension to count filings by: company_ticker (default), filing_type, filing_category, document_status, exchange, or sink (per-sink totals across configured sinks).company_ticker
date_fromNoEarliest filing date, YYYY-MM-DD inclusive.
min_countNoOnly return buckets with at least this many filings (0 = all).
filing_typeNoFiling type(s), e.g. 'Annual Report'; comma-separate to match several.
title_queryNoCase-insensitive substring matched against the filing title.
document_typeNoDocument type: pdf, html, xlsx, docx, or unknown.
document_statusNoDocument status(es): processed, skipped, failed, or unprocessed; comma-separate to match several.
filing_categoryNoFiling category(ies), e.g. LISTED_COMPANY; comma-separate to match several.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.9
    • changedInput schema / properties / group_by / description
      Previous value: -"Dimension to count filings by."New value: +"Dimension to count filings by: company_ticker (default), filing_type, filing_category, document_status, exchange, or sink (per-sink totals across configured sinks)."
    • changedInput schema / properties / group_by / enum
      Previous value: -[
      -  "company_ticker",
      -  "filing_type",
      -  "filing_category",
      -  "document_status",
      -  "exchange"
      -]New value: +[
      +  "company_ticker",
      +  "filing_type",
      +  "filing_category",
      +  "document_status",
      +  "exchange",
      +  "sink"
      +]
  2. Changed4 schema fields changedv0.1.3
    • addedInput schema / properties / document_type
      Added value: +{
      +  "default": "",
      +  "description": "Document type: pdf, html, xlsx, docx, or unknown.",
      +  "title": "Document Type",
      +  "type": "string"
      +}
    • addedInput schema / properties / min_count
      Added value: +{
      +  "default": 1,
      +  "description": "Only return buckets with at least this many filings (0 = all).",
      +  "title": "Min Count",
      +  "type": "integer"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "",
      +  "description": "Source of the filing, e.g. HKEx.",
      +  "title": "Source",
      +  "type": "string"
      +}
    • addedInput schema / properties / top_n
      Added value: +{
      +  "default": 20,
      +  "description": "Maximum buckets to return (1..200).",
      +  "title": "Top N",
      +  "type": "integer"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: filters combine with AND semantics, group_by="sink" only honours a subset of filters and returns relational-sink totals, top_n/min_count cap display buckets while total still counts every match, and buckets are sorted count-descending. This is exactly the extra context the 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?

Front-loaded with purpose, then siblings, then semantics — a logical order. It is dense and long, but nearly every clause carries a distinct behavioral fact (filter interaction, sink caveat, bucket vs total), so little is wasted.

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?

For a 13-parameter read-only aggregation tool with 100% schema coverage and an output schema present, the description covers the interaction rules and edge cases an agent needs (AND filters, sink-mode caveats, total vs buckets). Return-format explanation is correctly left to the output schema.

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 description coverage is 100%, so the baseline would be 3, but the description adds real meaning on top: the AND semantics across the 13 filters, the filter-subset restriction under group_by="sink", and the distinction that min_count/top_n never affect the reported total. It does not document every individual filter, which the schema already does.

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 verb+resource: counting filings grouped by one dimension or per sink. It also explicitly contrasts itself with its two closest siblings (get_coverage, verify_sinks), so an agent can route without opening another schema.

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?

Gives explicit when-to-use criteria ('grouped breakdown of one population') and names the alternatives with their distinguishing conditions: get_coverage = scrape coverage by month, verify_sinks = comparison across sinks. Nothing is left to inference.

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