Skip to main content
Glama

Classify cell types

classify_cells
Idempotent

Classify detected nuclei on H&E images into tumour, immune, connective, dead, or epithelial cell types, returning counts, percentages, and immune-to-tumour ratio.

Instructions

Classify the nuclei detect_nuclei saved on an H&E image as tumour, immune, connective tissue, dead or normal epithelial cells, and wait up to wait_seconds for the result.

Runs HoVer-Net (PanNuke weights, CC BY-NC-SA 4.0: research and education only) in the background, about 30 to 90 seconds per image: each nucleus annotation is relabelled with its type, and the result has counts, percentages and the immune-to-tumour ratio. Run detect_nuclei first. Needs a 20x or 40x image: coarser images are refused, because enlarging them can't add the detail the model reads. If it's still running when the wait ends, call it again (it waits for the same run).

Input Schema

NameRequiredDescriptionDefault
image_idYesId of an image in Image Label: the imageId (a UUID string) returned by list_images or an upload.
wait_secondsNoHow long to wait for the result; if it isn't ready, call again later to read it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields 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."
    • addedInput schema / properties / wait_seconds / description
      Added value: +"How long to wait for the result; if it isn't ready, call again later to read it."
  2. Addedv0.8.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency profile; the description adds the substance: background execution, 30–90s per image, relabelling of existing nucleus annotations, result contents (counts, percentages, immune-to-tumour ratio), and that a repeat call attaches to the same run. The licensing restriction (CC BY-NC-SA 4.0, research/education only) is a behavioral constraint an agent cannot infer from any structured field. This is consistent with readOnlyHint=false and idempotentHint=true.

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?

Front-loaded with the action and target, then constraints, then retry behavior. Despite being four sentences, each carries distinct operational information (classes, runtime, prerequisite, resolution floor, retry semantics) with no filler.

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?

Covers everything needed to invoke correctly: prerequisite tool, resolution requirement, expected latency, polling strategy, and a licensing constraint. Output schema exists, yet the brief return summary (counts, percentages, ratio) usefully sets expectations without duplicating the schema.

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 baseline is 3; the description still adds real meaning by framing wait_seconds as an upper bound on blocking and explaining that a second call with the same image waits on the same run rather than starting new work. image_id semantics are left entirely to the schema.

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 and resource ('Classify the nuclei detect_nuclei saved on an H&E image') plus the exact output classes, so the agent can distinguish it from detect_nuclei (which only finds nuclei) and segment_objects. The dependency on a prior detect_nuclei run is embedded in the first sentence, making the tool's role unambiguous.

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?

Explicit prerequisite ('Run detect_nuclei first') and an explicit when-not ('Needs a 20x or 40x image: coarser images are refused'), plus retry guidance when the wait expires. It does not name alternative siblings (e.g. segment_objects or analyze_slide) that an agent might consider, so it stops short of full alternative routing.

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