Skip to main content
Glama

Plot a titration curve

generate_titration_curve
Idempotent

Draw a titration curve of a weak or polyprotic acid against a strong base, computing pH versus titrant volume and marking equivalence points, buffer regions and indicator ranges.

Instructions

Draw a titration curve: weak (or polyprotic) acid vs. strong base.

Computes pH against titrant volume from the exact charge balance and marks equivalence points (per protolysis step), the buffer points (pH = pKa at half-equivalence) and optionally the indicator transition range as a shaded band.

Use this when the user asks about titrations, equivalence points, buffer regions or indicator choice. YOU supply the substance data from your knowledge: pKa values in ascending order, sensible concentrations (0.1 M is the classic teaching case) and the indicator's transition range.

Not this tool for: which species dominates at a given pH, or the degree of ionization across the pH range (use generate_species_distribution). A single pH value as a number is not drawn — that is calculate_ph, which solves the same charge balance and shows the working; this tool only draws.

Args: substance: Display name, e.g. "Acetic acid with NaOH" (localizable). pka_values: pKa per protolysis step, ascending (1-3 values). c_acid: Acid concentration in mol/L. v_acid_ml: Initial acid volume in mL. c_titrant: Titrant (strong base) concentration in mol/L. indicator: Optional {"name": "...", "ph_range": [low, high]}.

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": {
      "substance": "<substance>",
      "pka_values": "<pka_values>",
      "c_acid": "<c_acid>",
      "v_acid_ml": "<v_acid_ml>",
      "c_titrant": "<c_titrant>"
    },
    "name": "generate_titration_curve"
  }
}

Input Schema

NameRequiredDescriptionDefault
c_acidYes
c_titrantYes
indicatorNo
substanceYes
v_acid_mlYes
pka_valuesYes

Output Schema

NameRequiredDescriptionDefault
svgNo
nameYes
typeNoplot
filesNo
notesNo
subtitleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already mark it non-destructive, idempotent and not read-only, but do not explain why a 'draw' call is a write. The description compensates with real behavioral detail: pH is computed from the exact charge balance, equivalence points are marked per protolysis step, buffer points are at pH = pKa at half-equivalence, and the tool only draws rather than returning a number. It never states what artifact is produced or where it goes, which is the remaining gap for a non-read-only tool.

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-loads the single-sentence purpose, then computation, then routing, then parameter detail in a labeled Args block. The 'Not this tool for' sentence and the explicit warning that the agent must supply substance data both prevent errors, so no sentence is filler.

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 the drawn result need not be described, and all six parameters are documented with units and constraints. The one omission is behavioral: nothing says whether the call writes a file, returns image bytes, or how it fails on bad input, which matters given readOnlyHint=false.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% with six parameters and bare titles like 'C Acid', so the description carries the full burden and does: units for every quantity (mol/L, mL), pKa ordering and protolysis-step count (1-3, ascending), a concrete default value to use (0.1 M), and the internal shape of the indicator object ({name, ph_range: [low, high]}). This is meaning the schema does not provide.

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 artifact ('Draw a titration curve'), the exact chemical system it models ('weak (or polyprotic) acid vs. strong base'), and what appears on the plot (equivalence points, buffer points, optional indicator band). An agent can distinguish it from generate_species_distribution and calculate_ph without opening any schema.

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?

Explicit when-to-use trigger ('use this when the user asks about titrations, equivalence points, buffer regions or indicator choice') plus two named exclusions with the correct alternative for each: generate_species_distribution for speciation/degree of ionization, and calculate_ph for a single numeric pH. It also states the caller's responsibility to supply pKa, concentrations and indicator range.

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