Skip to main content
Glama

Autotune a template

autotune_template

Tune differential_drive, battery_peak_shaving, or root_zone_irrigation.

This is POST /v1/templates/autotune at $2.00. The name is differential_drive, battery_peak_shaving, or root_zone_irrigation. The reply returns tuned Q, R, Rd, and Qf. Send name and max_trials. Send header X-API-Key when a $29 pack still has autotune credits. One call spends 2 of those credits. With no key, or when the credits are gone, the call is HTTP 402 and an agent pays with x402. The reply returns the tuned weights for that template. Payment uses the same gate as the HTTP route.

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": {
      "request": "<request>"
    },
    "name": "autotune_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesPaid template tune at $2.00 for differential_drive, battery_peak_shaving, or root_zone_irrigation. Send X-API-Key (spends 2 autotune credits) or pay HTTP 402 with x402 on Base USDC. Validate a custom plant free first; these three names are built in. Each call starts a new study.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / request / properties / study_version
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "published",
      +        "physics-v1"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Irrigation only. Omit for physics-v1: start [0.17, 0.22, 0.22], comfort reference, horizon 9. published keeps the older start-on-reference horizon 24 scenario."
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / request / description
      Added value: +"Paid template tune at $2.00 for differential_drive, battery_peak_shaving, or root_zone_irrigation. Send X-API-Key (spends 2 autotune credits) or pay HTTP 402 with x402 on Base USDC. Validate a custom plant free first; these three names are built in. Each call starts a new study."
    • addedInput schema / properties / request / properties / max_trials / description
      Added value: +"Optuna trials for that plant. Default 20, must be >= 1 and <= 30."
    • addedInput schema / properties / request / properties / name / description
      Added value: +"Built-in plant: root_zone_irrigation, battery_peak_shaving, or differential_drive."
  3. Changed2 schema fields changed
    • changedInput schema / properties / request / properties / max_trials / default
      Previous value: -2New value: +20
    • changedInput schema / properties / request / properties / max_trials / maximum
      Previous value: -15New value: +30
  4. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false), the description discloses the cost per call, that 2 credits are consumed from a $29 pack, that missing or exhausted credits yield HTTP 402 settled via x402 on Base USDC, and that each call starts a new study — aligning with and enriching the non-idempotent hint. What it omits is execution behavior: whether the call blocks until tuning finishes or returns a job handle, which matters given the presence of start_autotune_job and get_autotune_job siblings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical facts (route, price, credentials, 402 fallback) are front-loaded, which is good. But the three template names are enumerated twice, and the return value is stated twice in near-identical phrasing ("returns tuned Q, R, Rd, and Qf" then "returns the tuned weights for that template"), adding noise without information.

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?

Payment, authentication, credit consumption, and outcome are all covered, and an output schema exists so return values need no prose. The remaining gap is the synchronous-versus-async question and the relationship to the job-based siblings, which an agent needs to sequence calls correctly in a toolset that includes start_autotune_job.

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 100% and the nested request object fully documents name (with enum), max_trials (bounds and default), and study_version (the published vs physics-v1 scenarios). The description only restates "Send name and max_trials" and adds no format or constraint detail beyond the schema, so the baseline 3 is appropriate.

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 opens with a specific verb and resource ("Tune differential_drive, battery_peak_shaving, or root_zone_irrigation") and names the exact route POST /v1/templates/autotune. It is clear what the tool does, but it never explains why an agent should pick this over the sibling per-plant tools autotune_battery_peak_shaving or autotune_root_zone_irrigation, so sibling differentiation is absent.

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

Usage Guidelines3/5

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

Usage context is implied through cost and payment details ($2.00, 2 credits, x402 fallback), which tells an agent this is the paid path, and the schema notes that a custom plant should be validated free first. However, there is no explicit when-to-use/when-not statement relative to the single-plant autotune siblings or the start_autotune_job/get_autotune_job pair.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.