Skip to main content
Glama

Exact endgame result (7 pieces or fewer)

tablebase
Read-onlyIdempotent

Get perfect play results for chess endgames with 7 or fewer pieces from Lichess's endgame database, including win/draw/loss, distance to mate or zeroing, and ranked moves.

Instructions

Exact result for an endgame with 7 or fewer pieces from the Lichess tablebase: win/draw/loss for the side to move, distance to mate or zeroing, and every move ranked. This is perfect play, not an estimate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fenYesPosition in FEN, e.g. "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1". Move counters may be omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dtmYesDistance to mate in plies, when known (positive = side to move mates).
dtzYesDistance to zeroing move (capture or pawn move), in plies.
fenYes
movesYesLegal moves, best first (as Lichess sorts them), up to 8.
piecesYes
resultYesFor the side to move: win, loss, draw, cursed-win, blessed-loss, maybe-win, maybe-loss, unknown.
sourceYes
verdictYesOne sentence, built from the tablebase result.
checkmateYes
stalemateYes
side_to_moveYes
insufficient_materialYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered without description help. The description adds the meaningful guarantee that results are exact perfect play rather than heuristics, but it does not state what happens when the 7-piece limit is exceeded or whether lookups can fail/be rate-limited.

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?

A single dense sentence leads with the resource and scope, then enumerates the outputs, then closes with the exactness caveat. No filler, no repetition of the title, and every clause carries information.

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 an output schema present the description needn't explain return values, and annotations cover safety; the one-parameter schema is fully documented. The remaining gap is the out-of-range failure mode and the absence of explicit sibling routing, which keeps it short of complete.

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?

There is a single parameter (fen) with 100% schema description coverage, including a format example and the note that move counters may be omitted, so the schema does the heavy lifting. The description does not mention FEN at all and adds nothing beyond it, which is the expected baseline when coverage is complete.

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+resource: exact endgame result from the Lichess tablebase, with the piece ceiling (7 or fewer) and the returned fields (win/draw/loss, distance to mate or zeroing, ranked moves) spelled out. The clause 'perfect play, not an estimate' distinguishes it from the sibling evaluate_position, which is engine-driven and approximate.

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?

The '7 or fewer pieces' constraint is an effective precondition that tells the agent when this tool is applicable. However, it never explicitly names an alternative for positions outside that bound (e.g., evaluate_position), leaving the routing decision to inference.

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