Skip to main content
Glama

viewshed

Calculate what is visible from a point, returning visible/hidden areas, farthest visible distance, and a map for spawns, sniper spots, hiding places, or objective visibility.

Instructions

What can be seen from a point: for each reachable cell, a ray from the eye to a point target_height above the floor. Returns visible and hidden area, the farthest visible distance and a map. Use it for spawns (what does an enemy see?), sniper spots, hiding places, objective visibility. The area is the one that contains the point.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cellNo
namesNo
pointYes
max_stepNo
max_rangeNo
eye_heightNo
agent_heightNo
agent_radiusNo
max_slope_degNo
target_heightNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does a fair job: it discloses the ray-casting method, the three return artifacts (visible area, hidden area, farthest distance, map), and the area-containment rule. It omits any note on cost/performance for a 60-unit-range sweep, which is the main behavioral gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core definition before the use cases, with no filler. It is information-dense rather than padded, though the use-case list could be trimmed without loss.

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?

With 10 parameters, no output schema, and no annotations, the description covers the return values well (compensating for the missing output schema) but leaves most parameters unexplained and gives no cost or prerequisite guidance. Adequate but clearly incomplete for a tool of this complexity.

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?

Schema description coverage is 0% across 10 parameters. The description names only target_height and implies eye_height via 'ray from the eye'; the other eight (cell, names, max_step, max_range, agent_height, agent_radius, max_slope_deg) are undocumented anywhere, so the description fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific computation and its output: 'for each reachable cell, a ray from the eye to a point target_height above the floor. Returns visible and hidden area, the farthest visible distance and a map.' The phrase 'for each reachable cell' implicitly distinguishes it from single-ray siblings like line_of_sight, but it never names those alternatives explicitly.

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 use cases — spawns ('what does an enemy see?'), sniper spots, hiding places, objective visibility — which is clear when-to-use context. It stops short of naming alternatives such as sightline_map or line_of_sight, so an agent must infer which visibility tool to pick.

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