This example showcases an advanced privacy workflow using VLM Run MCP tools. The agent first detects all faces in a group photo and then, based on a simple follow-up command, intelligently blurs all faces except for a specified individual. This is extremely useful for focusing on a main subject while anonymizing others.

Use Case Overview

Often in photography, especially for journalism or public sharing, it’s necessary to protect the privacy of individuals who are not the main subject of the photo. This workflow automates that process. After an initial face detection scan, the user can specify which person to keep in focus using plain language (e.g., “the middle one”), and the agent will redact all other faces.

Workflow Steps

Try it out yourself with the following prompts (in Claude Desktop or Web):
Prompt 1: “Detect the faces in this image: https://cdn.mos.cms.futurecdn.net/Yvs83nR9GrDk9bq4Weq5eZ.jpgPrompt 2: “Ok, now blur all the detected faces, except for the middle one.”
The agent uses a sequence of tools to understand the image content and then perform a precise edit: I can help with that. I’ll start by locating all the faces and will then blur all but the one you want to keep.
1

Load and detect faces

First, use the put_image_url tool to load the image. Then, immediately use the detect_faces tool to get the coordinates of all faces.
// detect_faces call
{
  "image": {
    "id": "img_0c01",
    "type": "image"
  }
}
Response: The tool returns a list of bounding boxes and confidence scores for 5 detected faces. The agent then summarizes their locations.
2

Identify the face to exclude from blurring

Based on the user’s second prompt, the agent analyzes the locations of the detected faces. It correctly identifies that “the middle one” corresponds to “Face 3”, which is located in the center of the image.
3

Blur all other faces

Use the blur_bboxes tool. Crucially, the agent passes the bounding boxes for every face except Face 3, ensuring only the intended subject remains clear.
{
  "image": {
    "id": "img_0c01",
    "type": "image"
  },
  "bboxes": [
    // Bounding box for Face 1
    {"xywh": [0.2166, 0.3703, 0.1111, 0.1481]},
    // Bounding box for Face 2
    {"xywh": [0.6444, 0.3814, 0.1111, 0.1481]},
    // Bounding box for Face 4
    {"xywh": [0.8148, 0.4222, 0.1111, 0.1481]},
    // Bounding box for Face 5
    {"xywh": [0.4740, 0.4777, 0.1111, 0.1481]}
  ]
}
Response: A new image is created with the selective blurring applied.
{
  "id": "img_6908",
  "type": "image"
}
4

Generate final preview

Use the preview_object_ref tool to generate a shareable URL for the final, selectively redacted image.
{
  "obj": {
    "id": "img_6908",
    "type": "image"
  }
}
Response:
[https://mcp.vlm.run/files/img_6908](https://mcp.vlm.run/files/img_6908)

Example Result

Original Image

Original group photo

Selectively Blurred Image

Image with four faces blurred and the middle face clear

Selective Face Blurring Results

Build Your Own Intelligent Redaction Workflows

This conversational, multi-step editing process opens the door for highly specific content moderation and privacy use cases. You can adapt this “detect-then-selectively-modify” approach for many scenarios.
  • 👩‍🏫 Education: In a classroom photo, blur the faces of all students to protect their privacy, leaving only the teacher visible.
  • 🎤 Public Events: Keep a public speaker or performer in focus while anonymizing the crowd in the background.
  • 📰 Journalism: Protect the identities of sources or bystanders in a photo without having to manually edit the image.
  • 👨‍👩‍👧‍👦 Personal Photos: Share a group photo while respecting the privacy of friends who prefer not to be shown online.

Try our MCP server today

Head over to our MCP server to start building your own document processing pipeline with VLM Run. Sign-up for access on our platform.