Skip to main content
Glama

Run Control Preprocessor

sdnext_preprocess

Apply control preprocessors (canny, depth, pose, lineart) to an image and get the processed map for ControlNet, guidance, or image conditioning.

Instructions

Run a control preprocessor (canny, depth, pose, lineart, ...) on an image and return the processed map (SD.Next /sdapi/v1/preprocess). Preprocessor names from sdnext_list_preprocessors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesBase64-encoded image (raw base64, data: URL, or "upload:<id>" ref).
modelYesPreprocessor name (e.g. "canny", "depth_midas", "pose_dwpose", "lineart_realistic").
paramsNoPreprocessor settings (see sdnext_list_preprocessors params).
Behavior3/5

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

No annotations are provided, so the description carries the burden. It states the tool runs a preprocessor and returns the processed map, which is the core behavior. However, it doesn't mention whether the operation is read-only, whether it modifies stored images, or what output format the map will be in, leaving some behavioral gaps given no annotations.

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?

The description is a single sentence (with a parenthetical endpoint hint) that captures the action, input, output, and source for valid preprocessor names. No wasted words.

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?

For a tool with 3 params, 100% schema coverage, and no output schema, the description is reasonably complete: it explains the purpose, points to the list tool for preprocessor names, and notes the return is a processed map. It could mention the image input format details, but the schema already covers that, so the description adds enough context.

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 the schema already documents all three parameters (image, model, params). The description adds minor context by giving examples of preprocessor names and pointing to sdnext_list_preprocessors for params, but it doesn't go beyond what the schema provides. 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?

The description clearly states the tool runs a control preprocessor (canny, depth, pose, lineart) on an image and returns the processed map. It names the endpoint and points to the sibling tool sdnext_list_preprocessors for valid names, which distinguishes it from related tools like sdnext_detect or sdnext_process_image.

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?

The description indicates the preprocessor names come from sdnext_list_preprocessors, giving clear context for when to use this tool (applying a preprocessor). It doesn't explicitly state when not to use it or mention alternatives like sdnext_detect or sdnext_control, so it falls slightly short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/sdnext_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server