Skip to main content
Glama

Normalize H&E stain

normalize_stain

Standardizes H&E image colors with Macenko stain normalization to make slides from different labs comparable, saving the result as a new image while leaving the original unchanged.

Instructions

Make an H&E image's colours standard (Macenko stain normalization), saved as a NEW image.

Slides from different labs and scanners differ in pink and purple tones; normalizing them makes images comparable and helps models such as detect_nuclei. The original is unchanged. Returns the new image.

Input Schema

NameRequiredDescriptionDefault
image_idYesId of an image in Image Label: the imageId (a UUID string) returned by list_images or an upload.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.1
    • addedInput schema / properties / image_id / description
      Added value: +"Id of an image in Image Label: the imageId (a UUID string) returned by list_images or an upload."
  2. Addedv0.3.3

TDQS

A4.1/5.0
Behavior4/5

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

Adds meaningful context beyond annotations: names the algorithm (Macenko), states the original is unchanged and a new image is created, which is consistent with readOnlyHint=false and destructiveHint=false. It does not address idempotency (annotations say non-idempotent) or failure modes, so it stops short of full transparency.

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?

Front-loaded with the core action and the key fact (saved as a NEW image) in the first line; the method and rationale follow. Slightly wordy with a redundant closing 'Returns the new image,' but no sentence is wasted.

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?

Output schema exists, so return values need not be described, and the non-destructive behaviour plus algorithm name are supplied. For a single-parameter mutation tool with annotations covering safety profile, the only missing piece is idempotency/failure behaviour.

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 coverage is 100% and the single image_id parameter is fully documented there, including that it comes from list_images or an upload. The description adds no parameter-level detail, so baseline 3 applies.

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 (normalize an H&E image's colours via Macenko) and immediately clarifies the output is a NEW image, distinguishing it from transformation-in-place siblings like update_image_metadata. An agent can tell exactly what this does without opening the schema.

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 clear context for when it is useful: slides from different labs/scanners differ in pink and purple tones, and normalizing makes them comparable and helps models such as detect_nuclei. This implicitly routes the agent (run before detection/classification), though it does not state explicit exclusions or prerequisites (e.g. requires an H&E slide).

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