Skip to main content
Glama
marches-publics

marches-publics

Rank top buyers or suppliers (DECP)

rank_decp_parties
Read-onlyIdempotent

Identifies and ranks top buyers or suppliers in French awarded public contracts by contract count or total value, with filters for CPV sector, department, keywords and dates.

Instructions

Rank the top buyers or suppliers of French awarded contracts (DECP).

Use for: "who are the main suppliers of IT services in Occitanie in 2025", "which buyers spend most on cleaning". Aggregated upstream over all matching contracts, not only a page. Example: by="supplier", order="amount", cpv_prefix="72", department="31". Do NOT use to list individual contracts (search_decp_awards). Read caveats: DECP coverage is incomplete and amounts are notified values, not payments.

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": {
      "by": "<by>"
    },
    "name": "rank_decp_parties"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYes`buyer` = who purchases most, `supplier` = who wins most.
topNoNumber of ranks (1-50).
orderNoRank by number of contracts or by total amount (EUR).count
keywordsNoWords that must all appear in the title/object, in French for BOAMP/DECP. Words of 4 letters or fewer (acronyms: IA, ERP, SIG) match whole words only; longer words also match their plurals.
cpv_prefixNoCPV code or prefix, 2-8 digits (e.g. 72 = IT, 7222 = IT consulting). Optional check digit (-N, as stored in DECP) is ignored.
departmentNoDepartment code: 01-95, 2A, 2B or 971-976.
buyer_siretNoRestrict to one buyer (14-digit SIRET).
notified_toNoLatest date, ISO YYYY-MM-DD.
notified_fromNoEarliest date, ISO YYYY-MM-DD.

Output Schema

NameRequiredDescriptionDefault
byYes`buyer` or `supplier`.
hintNoWhat to change when nothing matched.
orderYes`count` or `amount`.
caveatsNo
entriesYes
filtersNo
total_contractsYesContracts matching the filters (all ranks).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, but the description adds behavior the annotations cannot: aggregation happens upstream over all matching contracts, not just one page. It also discloses data-quality caveats (incomplete DECP coverage, notified amounts rather than payments), which materially affects how the agent should present results. Only minor gaps remain (e.g., behavior on empty result sets).

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?

Front-loaded with purpose, then labeled "Use for", "Do NOT use", example, and caveat pointer. Every line carries distinct information; no filler or restatement of the title.

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 nine parameters, full schema coverage, an output schema, and annotations covering the safety profile, the description supplies the remaining essentials: aggregation scope, sibling routing, and data caveats. Slight gap in not mentioning result limits or empty-result behavior, but nothing an agent needs to invoke it correctly is missing.

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 (by, top, order, keywords, cpv_prefix, department, buyer_siret, date bounds) is already documented with enums, patterns and examples. The description's worked example illustrates a combination but adds no semantics beyond the schema; baseline 3 applies.

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?

Specific verb plus resource: "Rank the top buyers or suppliers of French awarded contracts (DECP)". It also scopes the operation (top-N ranking rather than listing), which makes it immediately distinguishable from the sibling contract-listing tool.

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?

It gives two concrete natural-language queries that map to this tool, an explicit exclusion ("Do NOT use to list individual contracts (search_decp_awards)"), and a concrete parameter example. The when-to-use and when-not-to-use conditions are both stated outright.

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