Skip to main content
Glama

Last Price

create_hosted_model

Create a hosted pricing model, with no version yet: add one with train_hosted_model or upload_hosted_model_version. A demand model outputs the chance of a sale and its price sensitivity, and the optimizer prices from that; a price model outputs a price, or a ratio of the current price. Names are unique in a workspace (409 when the name is taken). 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
kindYesdemand: outputs a demand curve the optimizer prices from. price: outputs a price or a ratio.
nameYesA name for the model, unique in your workspace.
descriptionNoWhat the model is for.
auto_promoteNoMake a nightly candidate active when it beats the active version on held-out quotes. Defaults to false.
auto_retrainNoA demand model only: train a new candidate every night from your outcomes. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing concrete failure modes and their codes: 409 on duplicate name, 404 not_released when the hosted-pricing-models release is off, 403 for unclaimed sandbox workspaces. It also states the auth prerequisite (Last Price credential with publish scope), which no annotation conveys.

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 purpose and next steps, and every sentence carries information (naming rule, release gate, credential, workspace claim). It is dense and slightly run-on, but nothing 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?

There is no output schema, and the description does not say what a successful call returns (e.g. a model id to feed into train_hosted_model), which is the one piece an agent needs to chain calls. Prerequisites, error paths and model semantics are otherwise thoroughly covered for a mutation tool.

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 the baseline is 3; the description earns a bump by explaining what each model kind actually outputs and how the optimizer consumes a demand model, giving the 'kind' enum meaning the schema's one-liner only sketches. Other parameters (auto_promote, auto_retrain) are left entirely to the schema.

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 resource ("Create a hosted pricing model") plus the key state constraint ("with no version yet"), and immediately names the siblings train_hosted_model and upload_hosted_model_version as the follow-on actions. An agent can distinguish this from those siblings 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?

Explicitly routes the agent: create here, then add a version via train_hosted_model or upload_hosted_model_version. It also explains the demand-vs-price choice in terms of which downstream component consumes the model, which is the decision an agent must make when picking the 'kind'.

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