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...

High parameter count (12 properties)

Part of the Mcp Runware MCP server. Enforce policies on this tool with Intercept, the open-source MCP proxy.

elijahdev0/mcp-runware Write Risk 2/5

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. Intercept'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.

elijahdev0-mcp-runware.yaml
tools:
  imageMasking:
    rules:
      - action: allow
        rate_limit:
          max: 30
          window: 60

See the full Mcp Runware policy for all 11 tools.

Tool Name imageMasking
Category Write
Risk Level Medium

View all 11 tools →

Agents calling write-class tools like imageMasking have been implicated in these attack patterns. Read the full case and prevention policy for each:

Browse the full MCP Attack Database →

Other tools in the Write risk category across the catalogue. The same policy patterns (rate-limit, validate) apply to each.

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? +

Add a rule in your Intercept YAML policy under the tools section for imageMasking. You can allow, deny, rate-limit, or validate arguments. Then run Intercept as a proxy in front of the Mcp Runware MCP server.

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 Intercept 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 Intercept 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). Intercept sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policies on Mcp Runware

Open source. One binary. Zero dependencies.

npx -y @policylayer/intercept
github.com/policylayer/intercept →
// GET IN TOUCH

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

Message sent.

We'll get back to you soon.