Skip to main content
Glama
iftahs
by iftahs

morphology

morphology
Destructive

Apply morphological transformations to grow or shrink masks using dilation, erosion, opening, closing, or median filters. Specify operator, size, amount, and iterations for precise mask control.

Instructions

MorphologicalTransformation (Dilation/Erosion/Opening/Closing/Median) — grow/shrink masks. Checkpoints first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
sizeNo
amountNo
operatorNo
checkpointNo
iterationsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false. The description adds the concrete behavioral instruction 'Checkpoints first,' which tells the agent to preserve state before a mutation. It does not fully describe in-place modification or failure modes, but it extends the annotation coverage without contradicting it.

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 very short and front-loaded with the operation type and purpose, and the checkpoint warning earns its place. However, it is terse enough that an agent may still need to inspect the schema or sibling tools for parameter semantics.

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

Completeness2/5

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

With six parameters, zero schema description coverage, no output schema, and a destructive hint, the description is incomplete. A correct invocation requires knowing what id refers to, how size relates to the structure element, what amount/iterations mean, and how the checkpoint parameter behaves—none of which are covered.

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%, so the description must compensate, but it only hints at operator meaning (Dilation/Erosion/Opening/Closing/Median) while leaving size, amount, iterations, checkpoint, and id unexplained. It does not clarify the distinction between amount and iterations or the effect of checkpoint as a parameter.

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?

The description names the resource (masks) and the action (grow/shrink) and lists specific operators (Dilation/Erosion/Opening/Closing/Median), making it reasonably clear among mask-related siblings. It is less crisp than a full verb+object sentence, but it distinguishes morphology from binarize, blur, and mask creation tools.

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?

The description gives clear operational context: use it to grow or shrink masks, and checkpoint before running because the operation is destructive. It does not explicitly name alternatives or exclusions, but the tool's purpose is distinctive enough that the main usage is evident.

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