Skip to main content
Glama

product_optimize

Read-onlyIdempotent

Finds optimal values for decision variables based on your stated objective, respecting ranges and constraints. Returns per-variable optima and improvement metrics.

Instructions

Estimate the best value for each decision variable given a plain-English objective, and return the per-variable optima. Every variable is sampled uniformly over its [min, max] range; an objective containing 'maximize' favors each variable's max, anything else favors the min, and the returned optimum blends that endpoint with the range midpoint. Use product_decision when you want a proceed/pause/reject recommendation instead of raw optima. Synchronous deterministic compute; nothing is persisted. Returns optimal_values, objective_value, improvement_vs_midpoint (percent), constraints_satisfied, and iterations_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engineNoSimulation engine; auto (default) selects one, lhs is recommended for optimization. Options: lhs, monte_carlo, qmc_sobol.
objectiveYesWhat to optimize, e.g. 'maximize profit' or 'minimize cost'; the wording sets the search direction.
variablesYesVariables as {name, min, max, unit?} objects with their allowed ranges.
iterationsNoSearch iterations, 100-100000; defaults to 1000.
constraintsNoBusiness constraints the answer must respect.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.3
    • addedInput schema / properties / constraints / description
      Added value: +"Business constraints the answer must respect."
    • addedInput schema / properties / engine / description
      Added value: +"Simulation engine; auto (default) selects one, lhs is recommended for optimization. Options: lhs, monte_carlo, qmc_sobol."
    • addedInput schema / properties / iterations / description
      Added value: +"Search iterations, 100-100000; defaults to 1000."
    • addedInput schema / properties / objective / description
      Added value: +"What to optimize, e.g. 'maximize profit' or 'minimize cost'; the wording sets the search direction."
    • addedInput schema / properties / variables / description
      Added value: +"Variables as {name, min, max, unit?} objects with their allowed ranges."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: it is synchronous and deterministic, nothing is persisted, variables are sampled uniformly over their ranges, and the objective wording ('maximize' vs. anything else) determines the favored endpoint blended with the midpoint. It also lists all return fields. This goes well beyond the readOnly/idempotent/destructive hints.

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?

Three sentences, each earning its place: purpose, algorithm, and usage guidance plus return fields. The purpose is front-loaded, and the entire description is compact with no fluff. It is appropriately sized for the tool's complexity.

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?

Despite no output schema, the description explicitly lists the return fields. It covers the algorithm, side effects (nothing persisted), determinism, and synchronous execution. It also provides the key usage distinction. For a tool with five parameters, this is a complete and self-contained description.

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

Parameters4/5

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

The schema already has 100% coverage with descriptions for each parameter. The description adds interpretive meaning for the objective parameter (how 'maximize' vs. other wording affects search direction) and for the variables array (uniform sampling over min/max). This enriches the schema's basic definitions, so it exceeds the baseline of 3.

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?

The description opens with a clear, specific statement: 'Estimate the best value for each decision variable given a plain-English objective, and return the per-variable optima.' It uses an action verb, identifies the resource, and describes the output. It also distinguishes itself from the sibling product_decision by explicitly stating that product_decision gives a proceed/pause/reject recommendation instead of raw optima.

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?

It explicitly states when to use this tool versus product_decision: 'Use product_decision when you want a proceed/pause/reject recommendation instead of raw optima.' This gives clear guidance on selection among alternatives. It implies that this tool is for raw optima, which is sufficient.

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

Deploy Server

Other Tools