Skip to main content
Glama
amanharshx
by amanharshx

model_predict

Read-only

Run inference with a trained model on an image URL, base64 image, or local image/video file; provide a model and exactly one source.

Instructions

Run inference with a trained model on an image URL or base64 image (source), or on a local image or video file (file_path). Give exactly one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iouNoIoU threshold used for NMS (0-0.95, server default applies if omitted).
confNoConfidence threshold (0.01-1, server default applies if omitted).
imgszNoInference image size (32-1280, server default applies if omitted).
modelYesModel ref by owner/project/model, ul:// URI, or slug (requires project).
sourceNoImage URL, base64-encoded image (standard or URL-safe; optional padding; ASCII whitespace ignored), or base64 data: URI (data:<mime>;base64,<payload>). Base64 is uploaded as an image file, bypassing the API source field's 4,096-character limit; MCP client argument limits may still apply, so prefer file_path for local files.
projectNoProject ref required when model is given by slug.
file_pathNoLocal path to an image or video file, uploaded as-is. The server decides which formats and sizes it accepts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.15
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Local path to an image or video file, uploaded as-is. The server decides which formats and sizes it accepts.",
      +  "type": "string"
      +}
    • changedInput schema / properties / source / description
      Previous value: -"Image URL, raw base64-encoded image, or base64 data: URI (data:<mime>;base64,<payload>). Local file paths are not supported."New value: +"Image URL, base64-encoded image (standard or URL-safe; optional padding; ASCII whitespace ignored), or base64 data: URI (data:<mime>;base64,<payload>). Base64 is uploaded as an image file, bypassing the API source field's 4,096-character limit; MCP client argument limits may still apply, so prefer file_path for local files."
    • changedInput schema / required
      Previous value: -[
      -  "model",
      -  "source"
      -]New value: +[
      +  "model"
      +]
  2. Changed3 schema fields changedv0.1.13
    • addedInput schema / properties / conf / description
      Added value: +"Confidence threshold (0.01-1, server default applies if omitted)."
    • addedInput schema / properties / imgsz / description
      Added value: +"Inference image size (32-1280, server default applies if omitted)."
    • addedInput schema / properties / iou / description
      Added value: +"IoU threshold used for NMS (0-0.95, server default applies if omitted)."
  3. Changed3 schema fields changedv0.1.12
    • changedInput schema / properties / model / description
      Previous value: -"Model id, or slug when project is also provided."New value: +"Model ref by owner/project/model, ul:// URI, or slug (requires project)."
    • addedInput schema / properties / project / description
      Added value: +"Project ref required when model is given by slug."
    • changedInput schema / properties / source / description
      Previous value: -"Image URL or base64 input string. Local file paths are not supported."New value: +"Image URL, raw base64-encoded image, or base64 data: URI (data:<mime>;base64,<payload>). Local file paths are not supported."
  4. Changed2 schema fields changedv0.1.6
    • addedInput schema / properties / model / description
      Added value: +"Model id, or slug when project is also provided."
    • addedInput schema / properties / source / description
      Added value: +"Image URL or base64 input string. Local file paths are not supported."
  5. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is known. The description adds that base64 inputs bypass the 4,096-char API limit and that MCP client limits may still bite, which is genuinely useful, but it says nothing about runtime cost, GPU usage, or how input is handled server-side.

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

Conciseness5/5

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

Two sentences, no filler, with the primary action front-loaded and the input-source rule following immediately. Every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter inference tool with no output schema, the description covers input selection adequately but omits what the call returns (detections, labels, scores) and how it relates to deployment_predict. An agent can call it, but cannot predict the response shape without experimenting.

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, but the description adds a real constraint the schema cannot express: source and file_path are mutually exclusive and exactly one must be supplied (the schema only marks model as required). That is value beyond the structured fields.

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 (Run inference) and resource (trained model) and enumerates the accepted input forms, so an agent immediately knows what the tool does. It does not, however, distinguish itself from the sibling deployment_predict, which sounds like the same operation against a deployment.

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?

The phrase 'Give exactly one' usefully constrains source vs file_path, but there is no guidance on when to call this versus deployment_predict, nor on how to choose an image source format. Usage is implied rather than explained.

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