Skip to main content
Glama

stv

Conducts single-winner instant-runoff voting using ranked-choice ballots, eliminating the candidate with fewest votes each round until a majority winner is determined.

Instructions

Single-winner STV / instant-runoff over ranking ballots.

Rounds: count top active preferences; a strict majority wins, else eliminate the fewest-voted (ties broken by eliminating the lexicographically largest) and transfer. Ballots with no remaining preference are exhausted. Clone-resistant. Errors if any ballot is not a ranking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
profileYes
tie_breakNolexicographic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
ruleYes
scoresNo
winnerYes
rankingNo
winnersYes
tie_breakNolexicographic
Behavior4/5

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

With no annotations, the description carries full burden. It details the iterative process: rounds, counting top preferences, strict majority win, elimination of fewest-voted with lexicographic tie-breaking, transfer of ballots, and exhaustion. It also mentions clone-resistance. This is thorough, though it could elaborate on edge cases like all candidates tied or handling of exhausted ballots.

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?

The description is concise, using three short paragraphs that front-load the purpose and then succinctly explain the algorithm. Every sentence earns its place; no filler or redundancy. It is well-structured for quick consumption.

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?

Given the complexity of STV and the presence of an output schema, the description adequately covers the algorithm, constraints, and tie-breaking behavior. It does not mention the return format, but that is unnecessary due to output schema availability. It could be improved by noting that only ranking ballots are accepted, but that is already stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 3 parameters (profile, tie_break, seed) but the description adds no information about them beyond what is in the schema. The description does not explain the effect of tie_break or seed, nor clarify that profile must contain ranking ballots. Schema description coverage is 0%, so the description fails to compensate.

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?

The description clearly states it is for 'Single-winner STV / instant-runoff over ranking ballots.' This explicitly identifies the specific voting rule and ballot type, distinguishing it from sibling tools like plurality, approval, borda, etc. The verb 'compute' is implied, but the purpose is unmistakable.

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 implies usage when a single winner is desired from ranking ballots via STV/IRV. It states 'Errors if any ballot is not a ranking,' indicating a constraint. However, it does not explicitly state when to use this tool versus alternatives (e.g., for multi-winner contexts or when ballots are not rankings), providing only implicit guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HrishiKabra/voting-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server