Skip to main content
Glama

Last Price

train_hosted_model

Destructive

Train a new version of a demand model on your workspace's own quote outcomes (reported, or inferred from what buyers did next). A held-out fifth of the quotes scores it against one pooled demand curve, and its metrics say by how much it did better. promote never (the default) stores it as a candidate, always makes it active, and if_better makes it active only when it beats the pooled curve and the active version. Answers 422 with the number of outcomes when there are too few to train on, and 422 for a price model. Answers 404 not_released while hosted models (the hosted-pricing-models release) are not switched on for your workspace. Needs a Last Price credential with function publish scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
promoteNoWhether the new version becomes active. Defaults to never.
model_idYesThe hosted model's id: id on a list_hosted_models result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false) by naming the exact failure surface: 422 with an outcome count when there are too few outcomes, 422 for a price model, 404 not_released while the feature flag is off, and 403 for a self-registered sandbox key. It also discloses the evaluation method (held-out fifth scored against one pooled demand curve) so the agent understands what the resulting metrics mean. The only minor gap is that it does not say explicitly what happens to the previously active version when promote=always, but the destructive implication is inferable from the activation semantics.

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?

The purpose sentence is front-loaded and each subsequent sentence contributes distinct operational facts: promote semantics, error codes, auth scope, workspace claim requirement. It is dense but not padded, though the credential and workspace-claim prerequisites could be compressed without loss.

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 two-parameter, no-output-schema mutation with real authorization and release-gating complexity, the description covers what the tool does, what the return metrics convey ('by how much it did better'), every expected error status, and both access prerequisites. An agent can decide whether to call it and predict the outcome without further context.

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?

Schema description coverage is 100%, so both parameters already have baseline documentation. The description nonetheless adds real meaning beyond the schema: the default of never, and the precise decision rule behind each enum value (beats the pooled curve and the active version). model_id semantics are left entirely to the schema, which already points at list_hosted_models, so no compensation was needed there.

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?

States a specific verb and resource: train a new version of a demand model on the workspace's own quote outcomes, with the training signal spelled out (reported outcomes or inferred from buyer behavior). What keeps it from a 5 is that it never differentiates itself from near-neighbors in the toolset such as create_hosted_model, upload_hosted_model_version, and especially promote_hosted_model_version, even though the 'promote' parameter overlaps with that last tool.

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

Usage Guidelines4/5

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

It explains the selection logic for the promote parameter in detail: never stores a candidate, always activates, if_better activates only when it beats both the pooled curve and the active version. It also lists gating prerequisites (publish-scope credential, claimed workspace, hosted-pricing-models release) that tell the agent when the call will fail rather than when to prefer an alternative tool. There is no explicit 'use this instead of X' routing.

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.

Resources