Medium Risk

imageMasking

Generate precise masks automatically for faces, hands, and people using AI detection. Enhance your inpainting workflow with smart, automated masking features. This function provides intelligent detection and mask generation for specific elements in images, particularly optimized for faces, hands,...

Risk signalsHigh parameter count (12 properties)

Part of the Mcp Runware server.

imageMasking can modify Mcp Runware data, with no limits today. PolicyLayer puts allow, deny, and rate-limit rules on every call. Live in minutes.

SECURE MCP RUNWARE →

Free to start. No card required.

AI agents use imageMasking to create or modify resources in Mcp Runware. Write operations carry medium risk because an autonomous agent could trigger bulk unintended modifications. Rate limits prevent a single agent session from making hundreds of changes in rapid succession. Argument validation ensures the agent passes expected values.

Without a policy, an AI agent could call imageMasking repeatedly, creating or modifying resources faster than any human could review. PolicyLayer's rate limiting ensures write operations happen at a controlled pace, and argument validation catches malformed or unexpected inputs before they reach Mcp Runware.

Write tools can modify data. A rate limit prevents runaway bulk operations from AI agents.

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "imageMasking": {
      "limits": [
        {
          "counter": "imagemasking_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}

See the full Mcp Runware policy for all 11 tools.

Get this rule live on your own Mcp Runware server in minutes. PolicyLayer enforces it on every call, before it runs.

ENFORCE ON MY MCP RUNWARE →

View all 11 tools →

These attack patterns abuse exactly the kind of access imageMasking gives an agent. Each links to the full case and the policy that stops it:

Browse the full MCP Attack Database →

Every attack above starts with a tool call. PolicyLayer checks each one against your policy first, so imageMasking only ever does what you allow.

SECURE MCP RUNWARE →

Other write tools across the catalogue. The same approach applies to each: rate-limit and validate the arguments.

What does the imageMasking tool do? +

Generate precise masks automatically for faces, hands, and people using AI detection. Enhance your inpainting workflow with smart, automated masking features. This function provides intelligent detection and mask generation for specific elements in images, particularly optimized for faces, hands, and people. Built on advanced detection models, it enhances the inpainting workflow by automatically creating precise masks around detected elements. IMPORTANT: For inputImage, only accept: 1. Publicly available URLs (e.g., "https://example.com/image.jpg") 2. File paths that can be processed by imageUpload tool first 3. Runware UUIDs from previously uploaded images Workflow: If user provides a local file path, first use imageUpload to get a Runware UUID, then use that UUID here. Args: inputImage (str): Image to process. ACCEPTS ONLY: Public URLs, Runware UUIDs, or file paths (use imageUpload first to get UUID). Supported formats: PNG, JPG, WEBP model (str): Detection model to use: Face Detection Models: - "runware:35@1" - face_yolov8n: Lightweight model for 2D/realistic face detection - "runware:35@2" - face_yolov8s: Enhanced face detection with improved accuracy - "runware:35@6" - mediapipe_face_full: Specialized for realistic face detection - "runware:35@7" - mediapipe_face_short: Optimized face detection with reduced complexity - "runware:35@8" - mediapipe_face_mesh: Advanced face detection with mesh mapping Specialized Face Features: - "runware:35@9" - mediapipe_face_mesh_eyes_only: Focused detection of eye regions - "runware:35@15" - eyes_mesh_mediapipe: Specialized eyes detection - "runware:35@13" - nose_mesh_mediapipe: Specialized nose detection - "runware:35@14" - lips_mesh_mediapipe: Specialized lips detection - "runware:35@10" - eyes_lips_mesh: Detection of eyes and lips areas - "runware:35@11" - nose_eyes_mesh: Detection of nose and eyes areas - "runware:35@12" - nose_lips_mesh: Detection of nose and lips areas Hand & Person Detection: - "runware:35@3" - hand_yolov8n: Specialized for 2D/realistic hand detection - "runware:35@4" - person_yolov8n-seg: Person detection and segmentation - "runware:35@5" - person_yolov8s-seg: Advanced person detection with higher precision confidence (float, optional): Confidence threshold (0-1, default: 0.25). Lower values detect more objects but may introduce false positives. maxDetections (int, optional): Maximum elements to detect (1-20, default: 6). Only highest confidence detections are included if limit exceeded. maskPadding (int, optional): Extend/reduce mask area by pixels (default: 4). Positive values create larger masks, negative values shrink masks. maskBlur (int, optional): Blur mask edges by pixels (default: 4). Creates smooth transitions between masked and unmasked regions. outputType (str, optional): Output format ('URL', 'dataURI', 'base64Data', default: 'URL') outputFormat (str, optional): Image format ('JPG', 'PNG', 'WEBP', default: 'JPG') outputQuality (int, optional): Output quality (20-99, default: 95) uploadEndpoint (str, optional): URL for automatic upload using HTTP PUT includeCost (bool, optional): Include generation cost in response taskUUID (UUID, optional): Unique task identifier Returns: dict: A dictionary containing the masking result with status, message, result data, and parameters. Note: Generated masks can be used directly in inpainting workflows. When using maskMargin parameter in inpainting, the model will zoom into masked areas for enhanced detail generation.. It is categorised as a Write tool in the Mcp Runware MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

How do I enforce a policy on imageMasking? +

Register the Mcp Runware MCP server in PolicyLayer and add a rule for imageMasking: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Runware. Nothing to install.

What risk level is imageMasking? +

imageMasking is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit imageMasking? +

Yes. Add a rate_limit block to the imageMasking rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block imageMasking completely? +

Set action: deny in the PolicyLayer policy for imageMasking. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides imageMasking? +

imageMasking is provided by the Mcp Runware MCP server (elijahdev0/mcp-runware). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Mcp Runware tool call.

Deterministic rules across all 11 Mcp Runware tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.