Skip to main content
Glama

Last Price

predict_with_hosted_model

Read-onlyIdempotent

Try a hosted model on a request context before (or after) promoting a version: the price it would give, and what the model said (a demand model's chance of a sale and elasticity, or a price model's output). Uses the active version unless version names another, and 409 when there is none. Nothing is metered or logged as a quote. 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 test scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
contextYesThe request context to price, as compute_price takes it. current_price is required.
versionNoThe version to try. Defaults to the active one.
model_idYesThe hosted model's id: id on a list_hosted_models result.
constraintsNoOptional limits on the price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations by disclosing that nothing is metered or logged as a quote, that the active version is used by default, and by enumerating the exact failure modes with their status codes and the prerequisite credential scope and workspace-claim state. All of this is consistent with readOnlyHint=true, idempotentHint=true, destructiveHint=false.

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 the purpose and outcome before prerequisites, and nearly every sentence carries distinct information (return shape, version default, 409, non-metering, 404 gating, auth, workspace claim). It is dense to the point of being a run-on in places, with stacked parentheticals, but no sentence is filler.

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 nested-object, no-output-schema tool, the description explains what is returned in model-specific terms, how version selection works, what is not persisted or billed, and every gate that would block a call. An agent has enough to decide whether to call it and to interpret a failure without opening anything else.

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%, including a rich nested context object and per-field descriptions, so the schema already carries parameter meaning. The description only restates the version default ('uses the active version unless version names another'), which the schema also says, and adds nothing about context fields, metadata keys, or constraints.

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 action (run a hosted model on a request context as a trial) plus exactly what comes back: the price it would give and what the model said, spelled out differently for demand vs price models. The 'before (or after) promoting a version' framing separates it cleanly from promote_hosted_model_version and from the production compute_price path.

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?

Clear situational framing ('try ... before (or after) promoting a version') plus hard conditions: 409 when no active version, 404 not_released when the hosted-pricing-models release is off, 403 for unclaimed sandbox workspaces, and a required Last Price credential with function test scope. It never names an alternative tool to use instead (e.g. compute_price for live serving), so it misses the top of the scale.

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