Skip to main content
Glama

borbur.net salary and tax calculators

D'Hondt seat calculator

dhondt_seats
Read-onlyIdempotent

Shares out seats with the D'Hondt method as in Spain's general elections (3% threshold over valid votes, blank votes count as valid). Give a Spanish province (its 2026 Congress seats are used) or a number of seats, and the votes per party. Source: https://borbur.net/tools/dhondt-calculator/

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": {
      "parties": "<parties>"
    },
    "name": "dhondt_seats"
  }
}

Input Schema

NameRequiredDescriptionDefault
blankNoBlank votes (default 0)
seatsNoSeats to share out (if no province)
partiesYesList of {name, votes}
provinceNoSpanish constituency, e.g. Madrid (optional)
thresholdNoThreshold in % (default 3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description adds genuinely non-obvious behavioral rules the annotations cannot convey: the 3% threshold is computed over valid votes and blank votes count as valid, which changes the denominator and can alter results. It does not state tie-breaking behavior or the shape of the returned allocation.

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?

Roughly fifty words in three moves: method and rules first, then how to call it, then provenance. No restatement of the name and no filler; the source link is short and documents where the algorithm rules come from.

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 five-parameter, single-purpose calculator with no output schema, the definition covers the ruleset, the two input modes, and the defaults an agent needs. The remaining gap is the return shape and tie-breaking, which an agent must infer from "shares out seats".

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 coverage is 100%, so the baseline is 3, but the description earns more: it explains that province drives the seat count from 2026 Congress apportionment and that the threshold operates over valid votes with blanks included. It clarifies the province-vs-seats relationship that the schema only hints at with "(if no province)", though it doesn't explain how a supplied threshold overrides the 3% default.

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 ("shares out seats with the D'Hondt method") and pins the exact variant: Spain's general elections, 3% threshold over valid votes, blanks counted as valid. This goes well beyond the title by fixing which electoral ruleset is applied, and the subject matter alone separates it from the salary-calculator siblings.

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 concrete invocation guidance: supply either a Spanish province (whose 2026 Congress seats are used) or a seat count, plus votes per party. That covers the two supported input modes and implicitly tells the agent the province and seats parameters are alternatives. It stops short of stating exclusions or what happens if both are supplied.

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