Skip to main content
Glama

Fr Decp Contract Stats

fr_decp_contract_stats
Read-onlyIdempotent

Aggregate French public-contract AWARD counts (DECP), grouped by one dimension, over the same filters as fr_decp_search_contracts (buyer, supplier, CPV, department, amount range, date range, keyword). Answers "which departments/regions/CPV codes/buyer types won the most French public contracts matching X" without pulling every matching row. Returns one row per group value with its contract count, sorted by count descending.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "limit": 5,
      "keyword": "informatique",
      "group_by": "acheteur_departement_nom"
    },
    "name": "fr_decp_contract_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of group rows to return (1-100). Default 20.
date_toNoLatest notification date, inclusive, YYYY-MM-DD.
keywordNoFree-text filter within the contract object (objet).
cpv_codeNoCPV code, exact or leading-digits prefix.
group_byYesDimension to group by: acheteur_departement_nom (buyer department), acheteur_region_nom (buyer region), acheteur_categorie (buyer type, e.g. Commune/Région), titulaire_categorie (supplier size category, e.g. PME/ETI/GE), titulaire_departement_nom (supplier department), codeCPV (CPV code), procedure (award procedure), type (Travaux/Fournitures/Services).
date_fromNoEarliest notification date, inclusive, YYYY-MM-DD.
buyer_nameNoSubstring match on the awarding buyer's name.
max_amountNoMaximum contract amount in euros.
min_amountNoMinimum contract amount in euros.
buyer_siretNoExact SIRET/SIREN of the awarding buyer.
supplier_nameNoSubstring match on the awarded supplier's name.
supplier_siretNoExact SIRET of the awarded supplier.
department_codeNoFrench department code of the awarding buyer.

Output Schema

NameRequiredDescriptionDefault
groupsNo
sourceNo
group_byNo
data_as_ofNoThe publisher's date for the file, never today's date; null with data_as_of_note when unreadable.
group_countNo
answered_fromNo
data_as_of_noteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / answered_from
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data_as_of / description
      Added value: +"The publisher's date for the file, never today's date; null with data_as_of_note when unreadable."
    • changedOutput schema / properties / data_as_of / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / data_as_of_note
      Added value: +{
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world, so the safety profile is covered. The description adds genuine behavioral context beyond them: the result is pre-aggregated (one row per group value with a count, sorted descending), which tells the agent it avoids row explosion and needs no client-side counting.

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 tight sentences: what it aggregates, the question it answers, and the shape of the return. The purpose and the 'without pulling every matching row' benefit are front-loaded; nothing is filler.

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 aggregation tool with a 100% documented schema and an output schema, the description covers everything an agent needs: grouping semantics, filter reuse, and result ordering. Return-value details are correctly delegated to the output schema rather than duplicated.

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% and the group_by enum is fully documented in the schema itself, so the schema carries the parameter burden. The description's parenthetical list of filter families (buyer, supplier, CPV, department, amount range, date range, keyword) is a helpful orientation but largely restates what each property already says.

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 and resource ('Aggregate French public-contract AWARD counts (DECP), grouped by one dimension') and immediately scopes it against the sibling fr_decp_search_contracts. An agent can distinguish this counting/grouping tool from a row-returning search without opening either schema.

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?

Gives a concrete selection signal: use it to answer 'which departments/regions/CPV codes/buyer types won the most ... matching X' without pulling every matching row, and notes it shares filters with fr_decp_search_contracts. It stops short of an explicit 'do not use this when you need full contract records' exclusion, but the intent is unambiguous.

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.