Skip to main content
Glama

Compare structures

compare_molecules
Idempotent

Compare 2-4 molecules side by side and highlight structural differences outside their shared scaffold, making drug-class and derivative distinctions visible.

Instructions

Compare 2-4 molecules side by side with their DIFFERENCES highlighted.

Computes the maximum common substructure (MCS): the shared scaffold stays neutral, everything outside it is highlighted — ideal for teaching drug classes ("what distinguishes ibuprofen from naproxen?"), homologous series or derivatives.

Use this when the user wants to compare structures, see differences between compounds, or study a drug class.

Reach for it in conversation too, not only on request: the word "difference" in a question about two substances is the trigger. Answering "what distinguishes ibuprofen from naproxen?" in prose leaves the reader to find the difference in two separate pictures — this figure marks it.

Not this tool for: a single structure (generate_molecule), or several structures that are merely to be drawn rather than contrasted (batch_generate).

Args: structures: 2-4 English/IUPAC names or SMILES strings. labels: Optional display names under each panel (localizable). title: Optional heading for the comparison (localizable).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "structures": "<structures>"
    },
    "name": "compare_molecules"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNo
labelsNo
structuresYes

Output Schema

NameRequiredDescriptionDefault
svgNo
nameYes
typeNoplot
filesNo
notesNo
subtitleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: it explains that the output is a figure computed via MCS with neutral scaffold, and why that matters pedagogically. What it does not disclose is that name resolution is open-world (openWorldHint=true) — the description implies plain names work but says nothing about lookup failures, invalid names, or how the resulting figure is delivered.

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?

Purpose is front-loaded in the first line and the exclusion/naming paragraph follows logically. The conversational-trigger paragraph is somewhat verbose and partly rhetorical ('two separate pictures'), but it does convey an actionable routing rule, so it earns its place without being trimmed.

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?

With an output schema present, the description needn't explain return values, and it covers purpose, alternatives, and all three parameters. The remaining gap is failure behavior for unresolvable names or malformed SMILES in an open-world tool, which an agent would want to know before calling.

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 description coverage is 0%, so the description must carry all parameter meaning, and it does go beyond the schema by stating the '2-4' cardinality constraint (absent from the schema), that structures accept IUPAC names or SMILES, and that labels/title are localizable display strings. It stops short of explaining mixed input handling (names and SMILES in one call) or what happens above 4 entries, so it earns baseline rather than full credit.

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?

Specific verb plus resource ('Compare 2-4 molecules side by side') with an unusually precise mechanism named: maximum common substructure, shared scaffold neutral, everything outside highlighted. That distinguishes it immediately from generate_molecule and batch_generate, which the description names outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States both when to use ('user wants to compare structures, see differences, study a drug class') and when not to ('a single structure (generate_molecule), or several structures that are merely to be drawn rather than contrasted (batch_generate)'), each with the sibling named. It even provides a conversational trigger ('the word "difference"') and a rationale for preferring a figure over prose.

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