Skip to main content
Glama

BetterChess

What a piece attacks

chess_attacks
Read-only

Returns the exact list of squares attacked by the piece standing on a given square in a chess position, together with that piece's type and colour. Returns an empty list when the square is unoccupied. Accepts a FEN, a PGN, or a list of SAN moves from the starting position.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fenNoFEN of the position.
pgnNoPGN; the position after the final move is used.
movesNoSAN moves from the start, e.g. ["e4","e5"].
squareYesThe square, e.g. "d5".

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, and the description adds meaningful behavior beyond that: the exact empty-list behavior for unoccupied squares, the output including piece type and colour, and the supported input formats. It does not contradict the annotations, though it could further clarify whether 'attacked' includes squares occupied by friendly pieces or only legal captures in the strict chess sense.

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 with no filler. The primary behavior is front-loaded, the unoccupied-square edge case is stated, and the input alternatives are summarized compactly. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers return content, an edge case, and input formats, but it does not explicitly state that exactly one of fen/pgn/moves is required alongside square. Since the schema marks all three as optional and only square is required, an agent could attempt an invalid call with just a square. The lack of an output schema also makes a slightly more explicit return-format statement valuable.

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 description coverage is 100%, so the schema already documents all four parameters. The description repeats the FEN/PGN/SAN input options but does not add substantial new meaning beyond what the schema's property descriptions provide, such as the constraint that at least one position source must be supplied.

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 uses a specific verb ('Returns') and names the exact resource: the list of squares attacked by a piece on a given square, plus the piece's type and colour. It is clearly distinct from the broader siblings chess_analyse and chess_review because it targets a precise, narrow computation.

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 makes the tool's domain obvious: call it when you need the squares a particular piece attacks. However, it never explicitly contrasts this with the sibling tools or states when not to use it, leaving the when-to-use decision largely implicit.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a clearly distinct aspect of chess: position analysis, attack computation for a specific square, and game replay review. There is no overlap in their outputs or intended use cases.

Naming Consistency4/5

All tools share a consistent 'chess_' prefix, but the second part mixes a verb (analyse, review) with a noun (attacks). The pattern is still predictable and readable, with only a minor deviation.

Tool Count5/5

Three tools is a well-scoped size for a focused chess analysis server. Each tool performs a distinct, valuable function and there is no bloat or redundancy.

Completeness4/5

The set covers position evaluation, tactical attack detection, and game review, which covers the core analysis workflow. Minor gaps exist, such as not providing full legal move lists or move validation, but agents can work around these with the existing tools.

Resources