Skip to main content
Glama

generate_titration_curve

Draws pH-versus-titrant-volume curves for weak or polyprotic acids with strong base, marking equivalence and buffer points and optional indicator transition 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]}.

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?

No annotations are supplied, so the description carries the full burden, and it largely does: it discloses the underlying physics (exact charge balance), the derived annotations (equivalence points per protolysis step, buffer points at pH = pKa, optional indicator band) and the fact that it draws rather than solves-and-explains. It does not state the output artifact format or cost/runtime, but the output schema covers return values.

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?

Front-loaded with verb+resource, then behavior, then when/when-not, then args — a logical order an agent can skim. It runs long and the Args block partly restates parameter names, but with 0% schema coverage that repetition is justified rather than wasteful.

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?

For a 6-parameter plotting tool with an output schema, everything needed to call it correctly is present: units, pKa ordering, guidance that the caller must supply the chemistry data from its own knowledge, and clear boundaries against the two nearest siblings.

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 coverage is 0% and all parameter titles are bare camel-case, so the Args block does real work: units for every numeric (mol/L, mL), ordering and cardinality constraint on pka_values (ascending, 1-3 values), substance as a localizable display name, and the shape of the optional indicator object ({"name", "ph_range": [low, high]}). Nothing is left to guess.

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?

Opens with a specific verb and resource: "Draw a titration curve: weak (or polyprotic) acid vs. strong base." It also names the computation basis (exact charge balance) and what is annotated on the plot, so the agent knows exactly what artifact this produces versus a numeric calculation.

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 ("when the user asks about titrations, equivalence points, buffer regions or indicator choice") plus two explicit exclusions with the correct alternative named: generate_species_distribution for speciation, calculate_ph for a single numeric pH. Routing is unambiguous.

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