Skip to main content
Glama

run_judged

Run a saved ComfyUI workflow with rubric-based judging to iteratively generate, fix, and keep the best result.

Instructions

Run a saved workflow under the harness: generate -> judge with the rubric -> fix -> judge ..., keeping the best result. prompt_field: the input that holds the prompt, e.g. "Positive.text"; on a retry the judge's problems are appended to it. description: what the image must show (the judge checks against it). rubric: rubric JSON file path or JSON (see harness.py). Starts in the background and returns a job id at once; poll get_judged(job_id). Needs JUDGE_URL and JUDGE_MODEL.

Input Schema

NameRequiredDescriptionDefault
setNo
nameYes
imagesNo
promptYes
rubricYes
descriptionYes
download_dirNo
prompt_fieldYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses real behavior: it runs in the background and returns a job id immediately, it requires the JUDGE_URL and JUDGE_MODEL environment variables, it retains the best result across iterations, and on a retry the judge's problems are appended to prompt_field. It still does not say what happens on failure, how many iterations, or whether the saved workflow definition is modified.

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 core behavior in the first sentence, then parameter notes, with no filler. The dense semicolon-chained param notes read a bit like shorthand, but every clause conveys something actionable.

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?

Covers the async contract, the env prerequisites and the retry behavior, and an output schema exists so return values need no explanation. However, for an 8-parameter tool with 5 required params and zero schema coverage, a required parameter ('name') and the set/images/download_dir inputs are never explained, which is a real gap for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all parameter meaning. It explains prompt_field (with a concrete format example like "Positive.text"), description, rubric (file path or inline JSON), and implies prompt, but leaves the required 'name' plus 'set', 'images' and 'download_dir' entirely undocumented.

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 saved workflow under the harness') and spells out the actual loop (generate -> judge -> fix -> judge, keeping the best result), which is what separates it from run_workflow and judge_image. It also names the polling sibling get_judged, so the agent can place the tool in the flow 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operational guidance: the call is asynchronous, returns a job id immediately, and must be followed by polling get_judged(job_id). It does not state when to prefer this over run_workflow (plain run) or judge_image (single judgement), so selection between siblings is left partly to inference.

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