Skip to main content
Glama

measure_clipped_blocks

Counts image blocks with pixels above a specified level to detect clipped regions, returning over-limit block counts and locations.

Instructions

Count image blocks with pixels above a level. Tiles the image in block_size px blocks and samples every 3rd pixel; a sample counts when its luminance or any channel is above level, and a block counts when more than block_fraction of its samples do. Returns JSON: blocks_over, total_blocks, locations (up to 10 counted blocks in descending fraction order: x, y, fraction). luminance is 0.2126R + 0.7152G + 0.0722B.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelYesPixel level; a sample whose luminance or any channel is above it counts
view_idYesView to measure
block_sizeNoBlock edge in pixels (default 50)
block_fractionYesFraction of a block's samples (0-1) that must be above level for the block to count

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly. It discloses the sampling strategy (every 3rd pixel), the counting condition (luminance or any channel above level), the block_fraction threshold, and the exact JSON return format including the luminance formula. This provides an agent with full visibility into the tool's behavior and approximation nature.

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?

The description is a single, dense paragraph that efficiently conveys the purpose, algorithm, and output. It is front-loaded with the core purpose and then details the method and return format. While not overly long, it packs a lot of information; it could be slightly more structured with bullets but remains readable and concise.

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

Completeness5/5

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

Given the tool's complexity (tiling, sampling, threshold, output), the description covers all essential aspects: the algorithm, the parameters, the output schema (even without an output schema, it explains the JSON fields), and the luminance formula. An agent has everything needed to call this tool correctly and interpret results. No major gaps identified.

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 all parameters are described. The description adds significant value by explaining how parameters interact: block_size default (50), block_fraction as a 0-1 fraction, and the sampling rule that ties level to the counting condition. This goes beyond the schema's basic descriptions and clarifies the algorithm's dependency on these inputs.

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 a specific verb (count) and resource (image blocks above a level). It distinguishes from sibling measurement tools by specifying the exact counting method and output structure. An agent can immediately understand what this tool does and how it differs from measure_core_clipping or measure_uniformity.

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 explains the internal algorithm and output but does not explicitly state when to use this tool versus alternatives. It implies usage for detecting clipped or bright regions but lacks guidance on when to prefer it over other measurement tools. There is no 'when not to use' or reference to siblings, leaving the agent to infer the best context.

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