Skip to main content
Glama

Run a prediction on a Replicate deployment

replicate_run_deployment

Runs a prediction against a deployment's current release, waits for completion, and optionally downloads output files locally for immediate use.

Instructions

Run a prediction against a deployment's current release. WAITS for the prediction to finish and (by default) auto-downloads the outputs locally — same UX as the curated generate_* tools.

Args:

  • deployment: "owner/name" of the deployment to run.

  • input: model input parameters as a JSON object (same shape the deployment's underlying model expects).

  • download (default true): download output files locally.

  • timeout_ms (optional): max ms to wait before returning a pending result you can poll with replicate_get_prediction.

Returns the standard prediction result (inline image preview / text output, URLs, local_paths, prediction_id).

Input Schema

NameRequiredDescriptionDefault
inputNoModel input parameters as a JSON object — same shape the deployment's underlying model expects.
downloadNoWhether to download the generated files locally. Default true. When false, only Replicate URLs are returned (URLs expire after ~24h).
deploymentYesDeployment to run, as "owner/name". Inspect it first with replicate_get_deployment.
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.1
    • addedInput schema / properties / input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv3.2.3

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say this is a non-idempotent, open-world, non-destructive write; the description adds the behavior that actually matters — it blocks until completion, auto-downloads outputs locally by default, and degrades to a pending prediction ID on timeout. It also enumerates the return payload (inline preview, URLs, local_paths, prediction_id), which is real disclosure beyond the annotations.

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-loads the two facts that govern invocation (blocking wait, auto-download) before the arg list, and the args are scannable. Minor waste from repeating the download default and the timeout-poll behavior already covered by the schema.

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?

With no output schema, the description correctly compensates by describing the return shape and the timeout fallback, so an agent knows what it gets back. It is complete for invocation; the only gap is not distinguishing itself from replicate_run_model or listing_deployments in the same workflow.

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%, so all four parameters are already documented, and the description largely restates them (download default true, timeout semantics) rather than adding new meaning. The only marginal addition is framing 'input' as matching the deployment's underlying model shape, which the schema also states. Baseline 3 is appropriate.

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 ('Run a prediction against a deployment's current release') and ties itself to the curated generate_* family, so an agent can tell what class of tool this is without opening the schema. The scope (deployment's current release, not arbitrary versions) is precise.

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 operational context: it waits, it downloads by default, and if timeout_ms is exceeded you poll with replicate_get_prediction — that gives the agent an explicit fallback path. It does not, however, explain when to pick this over the very similar sibling replicate_run_model (deployment vs public model), which is the one routing decision an agent is most likely to get wrong.

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