# Brainiall Image

> Background removal, upscaling, face restore, document OCR, table extraction, visual understanding.

- name: com.brainiall/image
- version: 1.0.0
- connection class: R0 (autonomous)
- trust: 80/100 flags: no-repository
- quality: 86/100 (good)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/com.brainiall%2Fimage
- tools: https://api.protogrid.dev/v1/servers/com.brainiall%2Fimage/tools

**An agent can connect right now, no human step.** Remote endpoint, no authentication, reachable on the last probe.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "image": {
      "type": "http",
      "url": "https://api.brainiall.com/mcp/image/mcp"
    }
  }
}
```


## Trust

- hygiene: 80
- liveness: 100
- freshness: 85
- provenance: 55
- drivers: +dns-namespace +website +reachable +uptime-100% ~updated-55d-ago -no-repository
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 86/100 (good)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-11-25; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 100 (weight 30)

- pass `tools.descriptions`: every tool has a description
- pass `tools.description_length`: descriptions are concise
- pass `tools.schemas`: every tool has an object input schema
- pass `tools.annotations`: 10 of 10 tools declare readOnlyHint or destructiveHint
- pass `tools.directory_hints`: every tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint
- pass `tools.token_cost`: about 2,061 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: 75 (weight 15)

- warn `stability.changes`: 10 tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 10, about 2,061 tokens to load them all
- tool set hash: aad8626a12469d439efec26b16761f66
- tools last changed: 2026-09-23T21:50:30.713Z
- badge: [![protogrid quality](https://protogrid.dev/badge/com.brainiall/image.svg)](https://protogrid.dev/servers/com.brainiall/image)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

- 2026-09-23 `understand_content` added
  - Multimodal extraction. Send an image, text, or both; define your schema of fields; get structured JSON. Brainiall Content Understanding engine. Unified multimodal field extraction over images and text.
- 2026-09-23 `run_skillsets` added
  - Run a multi-skill enrichment pipeline over a document image or text in one call. Brainiall Skillsets engine. Returns per-skill outputs ready for indexing or RAG.
- 2026-09-23 `document_to_markdown` added
  - Return the document as structured Markdown (headings, tables, lists, code blocks, math). Brainiall Doc Layout engine. The single API for converting documents to LLM-friendly format.
- 2026-09-23 `document_tables` added
  - Reconstruct every table in a document image into headers and rows. Returns: dict with keys: table_count (int), tables (list of {title, headers, rows, row_count, column_count}); [] if there are no tables.
- 2026-09-23 `document_query` added
  - Ask a natural-language question about a document image; returns a grounded answer plus the supporting line. Returns found:false rather than guessing when the document doesn't contain the answer. Returns: dict with keys: answer (str|null), found (bool), supporting_text (str|null), text (str).
- 2026-09-23 `document_extract` added
  - Turn a document image into structured fields. doc_type picks the schema (receipt/invoice/id/contract/form/generic). A page with no readable text returns an error rather than a guess. Returns: dict with keys: doc_type (str), fields (dict — null for any value not present), text (str — the recognised plain text).
- 2026-09-23 `check_image_service` added
  - Check health status of Image API services and loaded models. Returns: dict with keys: - status (str): 'healthy' or error state - models (dict): Loaded model status per capability - version (str): API version
- 2026-09-23 `restore_face` added
  - Restore and enhance faces in an image with the Brainiall face-restoration engine. Detects all faces via RetinaFace, restores quality (fixes blur, noise, compression artifacts), and pastes them back. Optionally enhances the background with the Brainiall image-upscaling engine. GPU-accelerated, sub-3s latency. Args: image_base64: Base64-encoded image data containing faces (PNG, JPEG, WebP). upscale: Output upscale factor -- 1 to 4 (default: 2). enhance_background: Whether to enhance background with the Brainiall image-upscaling engine (default: true). Returns: dict with keys: - image (str): Base64-encoded restored image - format (str): Output image format - width (int): Output width - height (int): Output height - upscale (int): Scale factor applied - processing_time_ms (float): Processing time in milliseconds
- 2026-09-23 `upscale_image` added
  - Upscale image resolution with the Brainiall image-upscaling engine. Enhances image resolution by 2x or 4x with the GPU-accelerated Brainiall image-upscaling engine super-resolution. Processes in tiles (256x256) to manage VRAM. Maximum output dimension: 8192x8192. Args: image_base64: Base64-encoded image data (PNG, JPEG, or WebP). scale: Upscale factor -- 2 or 4 (default: 4). Returns: dict with keys: - image (str): Base64-encoded upscaled image - format (str): Output image format - width (int): Output width - height (int): Output height - scale (int): Scale factor applied - processing_time_ms (float): Processing time in milliseconds
- 2026-09-23 `remove_background` added
  - Remove the background from an image. Uses Brainiall Cutout engine segmentation to precisely separate foreground from background. Returns a base64-encoded image with transparent background (PNG) or white background (WebP). Sub-500ms latency on GPU. Args: image_base64: Base64-encoded image data (PNG, JPEG, or WebP). output_format: Output format -- 'png' (with transparency) or 'webp'. Returns: dict with keys: - image_base64 (str): Base64-encoded result image - format (str): Output image format - original_size (dict): Original width and height - processing_ms (int): Processing time in milliseconds

Full history: https://api.protogrid.dev/v1/servers/com.brainiall%2Fimage/changes

## Remotes

- https://api.brainiall.com/mcp/image/mcp (streamable-http, auth none, reachable true, uptime30d 1)

## Packages

_none_

## Tools (10)

- `check_image_service`: Check health status of Image API services and loaded models.

Returns:
    dict with keys:
        - status (str): 'healthy' or error state
        - models (dict): Loaded model status per capability
        - version (str): API version
- `document_extract`: Turn a document image into structured fields. doc_type picks the schema (receipt/invoice/id/contract/form/generic).

A page with no readable text returns an error rather than a guess.

Returns:
    dict with keys: doc_type (str), fields (dict — null for any value not present), text (str — the recognised plain text).
- `document_query`: Ask a natural-language question about a document image; returns a grounded answer plus the supporting line.

Returns found:false rather than guessing when the document doesn't contain the answer.

Returns:
    dict with keys: answer (str|null), found (bool), supporting_text (str|null), text (str).
- `document_tables`: Reconstruct every table in a document image into headers and rows.

Returns:
    dict with keys: table_count (int), tables (list of {title, headers, rows, row_count, column_count}); [] if there are no tables.
- `document_to_markdown`: Return the document as structured Markdown (headings, tables, lists, code blocks, math).

Brainiall Doc Layout engine. The single API for converting documents to LLM-friendly format.
- `remove_background`: Remove the background from an image.

Uses Brainiall Cutout engine segmentation to precisely separate foreground from background.
Returns a base64-encoded image with transparent background (PNG) or white
background (WebP). Sub-500ms latency on GPU.

Args:
    image_base64: Base64-encoded image data (PNG, JPEG, or WebP).
    output_format: Output format -- 'png' (with transparency) or 'webp'.

Returns:
    dict with keys:
        - image_base64 (str): Base64-encoded result image
        - format (str): Output image format
        - original_size (dict): Original width and height
        - processing_ms (int): Processing time in milliseconds
- `restore_face`: Restore and enhance faces in an image with the Brainiall face-restoration engine.

Detects all faces via RetinaFace, restores quality (fixes blur, noise,
compression artifacts), and pastes them back. Optionally enhances the
background with the Brainiall image-upscaling engine. GPU-accelerated, sub-3s latency.

Args:
    image_base64: Base64-encoded image data containing faces (PNG, JPEG, WebP).
    upscale: Output upscale factor -- 1 to 4 (default: 2).
    enhance_background: Whether to enhance background with the Brainiall image-upscaling engine (default: true).

Returns:
    dict with keys:
        - image (str): Base64-encoded restored image
        - format (str): Output image format
        - width (int): Output width
        - height (int): Output height
        - upscale (int): Scale factor applied
        - processing_time_ms (float): Processing time in milliseconds
- `run_skillsets`: Run a multi-skill enrichment pipeline over a document image or text in one call.

Brainiall Skillsets engine. Returns per-skill outputs ready for indexing or RAG.
- `understand_content`: Multimodal extraction. Send an image, text, or both; define your schema of fields; get structured JSON.

Brainiall Content Understanding engine. Unified multimodal field extraction over images and text.
- `upscale_image`: Upscale image resolution with the Brainiall image-upscaling engine.

Enhances image resolution by 2x or 4x with the GPU-accelerated Brainiall image-upscaling engine
super-resolution. Processes in tiles (256x256) to manage VRAM.
Maximum output dimension: 8192x8192.

Args:
    image_base64: Base64-encoded image data (PNG, JPEG, or WebP).
    scale: Upscale factor -- 2 or 4 (default: 4).

Returns:
    dict with keys:
        - image (str): Base64-encoded upscaled image
        - format (str): Output image format
        - width (int): Output width
        - height (int): Output height
        - scale (int): Scale factor applied
        - processing_time_ms (float): Processing time in milliseconds
