Image Label MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LABEL_API_URL | No | API base URL, for another deployment or `sam local start-api` | https://labels.sachin-kale.com/api |
| LABEL_PASSWORD | No | Account password. Without credentials requests are anonymous and read-only in practice. | |
| LABEL_USERNAME | No | Account username. Without credentials requests are anonymous and read-only in practice. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_imagesA | List images saved in Image Label, optionally filtered by category (case-insensitive). Returns summaries; use get_image for annotations and the viewing URL. |
| get_imageA | Get one image's metadata, all annotations, and a signed viewing URL (valid 24h). |
| view_imageA | Look at an image: returns the picture itself, scaled to at most max_size pixels, with a yellow grid labelled in the ORIGINAL image's pixel coordinates. Use it before segment_objects or add_annotations to read where objects are (boxes and points are in those coordinates), and with with_annotations=true afterwards to check the outlines. region zooms into part of a large image (x, y, width, height in image pixels), e.g. to see individual nuclei. |
| update_image_metadataA | Update an image's name, category, sub-category or description. Omitted fields are left unchanged. |
| add_annotationsA | Append annotations to an image, keeping the existing ones. |
| replace_annotationsA | Replace ALL annotations on an image with the given list. Pass an empty list to clear them. |
| remove_annotationsA | Remove specific annotations from an image by their ids, keeping all the others. Use it to delete a few annotations; to change many at once (rename labels, fix shapes) use replace_annotations instead. Get the ids from get_image (each annotation's id field). Ids that are not on the image are ignored, and the rest are removed in one save. Returns the number removed and the new annotation count. |
| upload_imageA | Upload a local image file (path on the machine running this server) to Image Label. |
| upload_image_from_urlA | Download an image from an https URL and upload it to Image Label (PNG, JPEG, WebP, GIF, BMP or TIFF, up to 20 MB). Use this for images that are online, e.g. ones attached in a chat. |
| segment_objectsA | Trace precise outlines with Segment Anything and add them as polygon annotations. Give each object a rough box (or a point on it) in image pixels; the model finds the object's exact edges, so the box only has to contain the object. Prefer this to drawing polygons yourself. model: "sam" for photos and general images; "medsam" for medical images (CT, MRI, X-ray, ultrasound, endoscopy, pathology), which takes boxes only. Up to 20 objects per call. With save=false the outlines are returned without being saved. Each result has the model's quality score (0-1). |
| find_regionsA | Find the distinct objects in an image automatically, with no boxes needed: returns them numbered, with each one's exact box, and a picture with the numbered outlines drawn on it. Nothing is saved. Use it before segment_objects when an image has many similar objects (glands, cells, crypts, vessels) or when boxes are hard to place: look at the picture, choose the numbers that are the objects asked for, and pass their boxes unchanged to segment_objects (with model "medsam" for medical images). A region inside another is a part of it (e.g. a gland's lumen inside the gland): choose the one that matches the whole object. Objects not found as a region still need a box of your own. Takes about a minute (a few after a quiet spell, while the model loads); very small objects can be missed. |
| detect_nucleiA | Find and outline every cell nucleus in an H&E-stained histology image with StarDist, automatically. No boxes needed: the model finds the nuclei itself (it is trained on H&E; other stains and non-histology images give poor results). Returns the count, density, median nuclear area and how much nuclear size varies (a rough measure of pleomorphism). With mark_enlarged, nuclei over 2.5x the median area are labelled "enlarged nucleus" (in red), the rest "nucleus". The most confident max_nuclei outlines are saved. By default (replace_previous) nuclei saved by an earlier detect_nuclei run on this image are deleted first, so running it again replaces them rather than doubling them; other annotations are never touched. Pass replace_previous=false to keep the earlier nuclei. With microns_per_pixel (the scanner's resolution: often 0.25 at 40x, 0.5 at 20x) the image is resized to the model's best resolution and sizes are also given in square microns and density per square millimetre; without it, the image is resized by the size of its nuclei. The first run after a quiet spell takes up to a minute while the model starts (warm_up("nuclei") avoids the wait). |
| normalize_stainA | 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. |
| check_image_qualityA | Check a histology image's quality before analysing it (HistoQC-style checks). Measures how much of the image is tissue, blur, marker-pen ink, over- and under-exposure and faint staining. Returns a verdict (good, check or poor), the measurements and plain-language warnings. |
| warm_upA | Start loading a model ahead of use, without waiting for it: "sam" or "medsam" for segment_objects, "nuclei" for detect_nuclei. After a quiet spell a model takes a minute or two to start; call this as soon as you know you will need it (for example right after uploading), and do other work meanwhile. |
| classify_cellsA | 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). |
| analyze_slideA | Analyse a whole-slide image in the background and wait up to wait_seconds for the result. coverage "sample" (default) analyses up to max_tiles tiles spread over the tissue in a few minutes. "full" analyses every tissue tile (up to 3,000, about 200 mm2) in parallel parts and tints the overview as a density heatmap: a few minutes for a biopsy, longer for big resections. Cell types are on by default for a sample and off for full coverage (they take about 15x longer per tile); set cell_types to change that. Finds the tissue, samples up to max_tiles tiles of it (256 x 256 um each at 40x) and runs the quality check and StarDist nuclei on each: nuclei per mm2, nuclear size in um2, size variation and enlarged nuclei across the slide, plus per-tile values. With cell_types (default) each nucleus is also typed as tumour, immune, connective tissue, dead or normal epithelial (HoVer-Net, PanNuke weights: research and education only), about 40 seconds a tile, so max_tiles defaults to 12 (16 without cell types). Allow a minute more when the models start. If it's still running when the wait ends, call get_slide_analysis later. An analysis already running is waited for; restart=true starts a new one (e.g. with more tiles). |
| get_slide_analysisA | A whole slide's analysis: its status (queued, running with the current step, done or failed), and when done the slide-level summary, each analysed tile (position, nuclei per mm2, enlarged nuclei, quality), the images made from the densest tiles, and a link to every nucleus as QuPath GeoJSON. |
| upload_slideA | Upload a whole-slide file (.svs, .ndpi, pyramidal .tif/.tiff, up to 5 GB) from the machine running this server, and start its analysis in the background (see analyze_slide). |
| upload_slide_from_urlA | Copy a whole-slide file (.svs, .ndpi, pyramidal .tif/.tiff, up to 5 GB) from an https URL into Image Label, and start its analysis in the background (see analyze_slide). |
| share_imageA | A link that opens the image, with its current annotations, in the Image Label web app in anyone's browser: the app copies it into that person's own workspace to edit and export, with no account needed. Anyone with the link can see this one image and its annotations for 7 days; share it only with people who may see the image. |
| export_annotationsA | Export an image's annotations: COCO JSON or YOLO (polygons and circles, as the web app exports), or QuPath GeoJSON (File > Import objects in QuPath; nuclei found by StarDist come in as detections). |
| export_datasetA | Export several images as ONE training dataset, with one class list so ids mean the same everywhere. Choose the images by category (case-insensitive) or image_ids (up to 100). coco: one COCO file for all images; yolo: classes plus a label file per image, named after it; qupath: a GeoJSON file per image. classes fixes the class order; other labels follow in first-seen order. With output_dir (a folder on the machine running this server; not available when hosted) the files are written there and only a summary is returned, which suits large datasets such as nuclei. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyse_slide | Quality check, nuclei and a look at the result, for one H&E image or whole slide (an id, a URL or a path). |
| outline_objects | Outline named objects with Segment Anything, checking the result by looking at it. |
| build_training_dataset | Check a category's annotations and export them as one dataset. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 23 tools
Most tools have clearly distinct resource+action boundaries across image management, annotation editing, segmentation, slide analysis, and export. A few adjacent tools such as add_annotations vs segment_objects/detect_nuclei, and upload_slide auto-starting analysis vs analyze_slide, could be confused at first glance, but the descriptions cross-reference them.
All tool names use lower snake_case with a predictable verb_noun shape, e.g. list_images, upload_image_from_url, export_dataset. Suffixes such as _from_url and _slide_analysis are used consistently and remain readable.
At 23 tools, the set is in the heavy 16-25 range. The broad scope of general image labeling plus specialized pathology and whole-slide analysis makes many tools defensible, but the surface still feels somewhat over-scoped for one server.
Core image lifecycle and annotation lifecycle are well covered: upload/list/get/view/update metadata, add/replace/remove annotations, segmentation, histology analysis, and export. There are still noticeable gaps such as no delete_image/delete_slide and no list_slides operation beyond retrieving a slide analysis.