Skip to main content
Glama

Create NPR painterly filter

create_npr_filter

Transform any TOP into painterly art using oil, pencil, or watercolor effects. Creates a live-tweakable filter chain with radius, smoothness, and strength controls.

Instructions

Apply a non-photorealistic painterly filter to an existing TOP. A generalized Kuwahara (sector-based local variance smoothing) runs in a single GLSL TOP and branches into three looks selected by mode: oil (flat color regions, preserved edges), pencil (graphite sketch via luminance × edge magnitude), or watercolor (quantized chroma + low-frequency bleed). Creates a Select TOP → GLSL TOP → Null TOP chain under parent_path and exposes Radius / Smoothness / Strength as custom parent params bound by expression for live tweaking. Returns the GLSL TOP path, the bind-ready output null path, the fragment DAT path, exposed controls, and an glsl_compile_verified flag (always false offline — verify post-cook with get_td_node_errors).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_pathYesAbsolute path of an existing TOP to filter (e.g. '/project1/render1'). Pulled in via a Select TOP (no cross-COMP wire).
parent_pathNoParent COMP path to create the glslTOP + textDAT + nullTOP inside./project1
nameNoBase name for the glslTOP (textDAT becomes `<name>_frag`, output becomes `<name>_out`, source select becomes `<name>_src`).npr1
modeNoPainterly look. oil: full Kuwahara → flat color regions with preserved edges. pencil: luminance + edge-mag → graphite sketch. watercolor: quantize chroma + low-freq bleed.oil
radiusNoSampling radius in texels. Cost is O(radius² · sectors) — keep modest on 4K.
sectorsNoNumber of generalized-Kuwahara sectors. 8 = smoother painterly; 4 = classic Kuwahara (cheaper).8
smoothnessNoBlend between hard min-variance sector pick (0) and softmax-weighted average across sectors (1). Live control.
strengthNoWet/dry mix between source (0) and filtered output (1). Live control.
resolutionNoOutput resolution: 'input' inherits from the source (default), or '720p' (1280x720), '1080p' (1920x1080), '4K' (3840x2160).input
Behavior5/5

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

Annotations are readOnlyHint=false, destructiveHint=false, openWorldHint=true. The description adds behavioral context: it creates a specific node chain (Select TOP → GLSL TOP → Null TOP), exposes parent parameters, and notes that glsl_compile_verified is always false offline, requiring post-cook verification with get_td_node_errors. No contradiction with 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 detailed yet concise, front-loaded with the purpose, followed by algorithmic details, node chain construction, and return values. Every sentence provides necessary information without redundancy.

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?

Given the tool's complexity (9 parameters, no output schema), the description covers the creation process, return values, and verification steps. It explains the required source_path and modes but could elaborate on return format details. Overall, it is sufficiently complete for agent use.

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 description coverage is 100%, and the description adds value by explaining the Kuwahara algorithm, mode differences, cost implications (O(radius²·sectors)), and live control exposure. While the schema already documents parameters, the description deepens understanding moderately.

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 'Apply a non-photorealistic painterly filter to an existing TOP.' It specifies the verb (apply), resource (painterly filter), and target (existing TOP), and distinguishes itself from sibling tools like create_glsl_shader by focusing on the NPR filter node chain.

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 description explains when to use the tool (for applying a painterly filter) and lists different modes, but does not explicitly state when not to use it or mention alternative tools. Given the extensive sibling list, more guidance on prerequisites or comparisons would improve the score.

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/Pantani/tdmcp'

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