Skip to main content
Glama

Last Price

upload_hosted_model_version

Upload a model trained anywhere as a new version of a hosted model: the ONNX file as base64 (at most 4 MiB) and the spec that maps request fields to its inputs. It is checked before it is stored: it must parse, use only operators the hosted runtime runs (scikit-learn, XGBoost and LightGBM tree ensembles, linear models, small neural networks), take as many inputs as the spec lists, and give a finite answer of the right shape on a test row; otherwise it answers 422 naming the problem. Stored as a candidate unless promote is true. The hosted MCP endpoint (/api/mcp/rpc) takes requests of at most 64 KiB, so send a larger file with the stdio server, the tool packages or POST /api/hosted-models/{model_id}/versions. 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
specYesHow request fields become the model's inputs.
notesNoOptional notes kept with the version.
promoteNoMake it the active version at once. Defaults to false: stored as a candidate.
model_idYesThe hosted model's id: id on a list_hosted_models result.
artifact_base64YesThe .onnx file, base64 encoded. At most 4 MiB before encoding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the annotations, which only flag it as a non-idempotent, non-destructive write. The description discloses the validation gauntlet (must parse, only supported operators, matching input count, finite/shape-correct output), the 422-on-failure behavior, the candidate-vs-promoted default, size ceilings, and the auth/workspace prerequisites.

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 core action is front-loaded in the first sentence, with validation, gating, and transport constraints following. It is a dense single paragraph – every clause carries information, though the run-on length costs a point.

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 complex mutation with nested spec and no output schema, it covers validation rules, error codes, size limits, auth scope, workspace prerequisites, and success semantics (candidate vs active). An agent has everything needed to call it correctly or diagnose failure.

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 coverage is 100%, so the baseline is 3; the description adds real value on top by explaining the 4 MiB pre-encoding limit, the 64 KiB request cap, and what spec is for (mapping request fields to model inputs).

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: upload a model trained anywhere as a new version of a hosted model, with the artifact format (ONNX as base64) and the accompanying spec. It is clearly distinguishable from siblings like train_hosted_model, create_hosted_model, and promote_hosted_model_version.

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?

Gives concrete conditions: needs publish-scoped credential, a claimed workspace (sandbox keys get 403), and the release must be on (else 404). It also names alternatives for oversized files (stdio server, tool packages, direct POST). It stops short of explicitly contrasting with train_hosted_model, so it is strong but not exhaustive.

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