Skip to main content
Glama

Estadísticas de mercado

get_market_stats
Read-onlyIdempotent

Market KPIs for the global market, a sector or a comunidad, over the history Licto has processed (partial, not every published tender; per-source years at https://licto.es/fuentes#historico): all of it by default, or one period ('year' / 'quarter' / 'month' of tender PUBLICATION; period_start picks it, else the newest). A period row has period_start and is_final: false while the period is open, when its figures and top lists are partial. Tender volume (listable_count = tenders search can return; tender_count also includes contratos menores), open tenders now (open_count), budgets (prefer the medians), competition (avg bids, single-bid rate), top_contractors (company_id, name, wins = award lines won, awarded_eur; frameworks, personas físicas, hidden companies and public bodies excluded, so wins is not get_company's), top_authorities (organization_ids, tenders, budget_eur) and the procedure_type_dist / contract_type_dist counts. See get_glossary.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_market_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoWindow of the figures: 'all_time' (default) or one 'year', 'quarter' or 'month' of tender PUBLICATION. Without `period_start` the newest such period is returned, which may still be open (`is_final` false).all_time
sectorNoSector slug, e.g. 'tecnologia', 'construccion', 'sanidad'
comunidadNoComunidad autónoma by name, e.g. 'Madrid' or 'Cataluña'. Region names only (no provinces). Omit both for the global market.
period_startNoAny date inside the year / quarter / month wanted (ISO); needs `period` other than 'all_time'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, yet the description still adds substantial context: partial data coverage with a per-source link, `is_final: false` meaning figures and top lists are still partial, and exclusion rules for `top_contractors` (frameworks, personas físicas, hidden companies, public bodies). It also warns that `wins` will not match get_company's numbers, which prevents a real misinterpretation.

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 scope and the coverage caveat, and every clause carries information, including the long enumeration of returned metrics that substitutes for a missing output schema. However it is a single run-on paragraph with heavily nested parentheses, which costs readability; a light structural break would improve it without losing content.

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 carries the burden of explaining returns, and it does: listable_count vs tender_count (contratos menores), open_count, budget medians, competition metrics, top_contractors fields, top_authorities fields, and both distribution maps. Combined with the data-partiality and is_final caveats, an agent has everything needed to call and interpret it correctly.

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 description coverage is 100%, so every parameter is already documented in the schema, and the description largely restates it (publication-period semantics, newest-period default, sector/comunidad slugs versus region names). It reinforces the omit-both-for-global rule but adds no syntax or format detail 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?

Opens with a specific verb+resource pair: market KPIs scoped to the global market, a sector, or a comunidad. The scope distinctions and the historical-coverage caveat ('partial, not every published tender') let an agent immediately tell this aggregate tool apart from siblings like search_tenders or get_company.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes context (defaults to all history, newest period if no `period_start`) and points to get_glossary for terminology, but it never says when to prefer this tool over search_tenders for counts or get_company for contractor wins. It differentiates its `wins` metric from get_company's in passing, which is helpful, but no explicit when-not or alternative-selection rule is stated.

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