Skip to main content
Glama

Restore Face

restore_face
Read-onlyIdempotent

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
upscaleNoOutput upscale factor: 1-4 (default: 2)
image_base64YesBase64-encoded image data containing one or more faces.
enhance_backgroundNoEnhance background with the Brainiall image-upscaling engine (default: true)

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate readOnly, openWorld, idempotent, and non-destructive behavior. The description adds meaningful behavioral context beyond that: RetinaFace face detection, restoration of blur/noise/compression artifacts, compositing faces back, optional background enhancement, and GPU-accelerated sub-3s latency. This gives the agent a clear model of what happens at runtime.

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 well-structured with an overview, Args, and Returns sections. It is information-dense but not bloated; every section earns its place, and the Returns section is especially justified because no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully covers a tool with no output schema: it explains the operation, parameters, defaults, and complete return format. It covers performance, optional background behavior, and the required input, making it sufficient for an agent to invoke the tool correctly.

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%, so the baseline is 3. The description adds a bit beyond the schema by listing supported image formats (PNG, JPEG, WebP) for image_base64 and restating defaults. This small extra semantic detail helps the agent prepare the input correctly.

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 states a specific verb and resource: 'Restore and enhance faces in an image with the Brainiall face-restoration engine.' It adds process details like RetinaFace detection and pasting faces back, which clearly distinguishes this tool from siblings like remove_background or upscale_image.

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?

Usage is implied rather than explicit: the description explains that the tool is for face restoration and optional background enhancement, so an agent can infer when to use it. However, it does not explicitly state when not to use it or mention sibling alternatives such as upscale_image.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation4/5

Most tools are clearly distinct: document_* handle document analysis, while image tools (remove_background, restore_face, upscale_image) are unambiguous. However, document_extract and understand_content both perform field extraction from documents, differing mainly in schema flexibility, which could cause misselection. run_skillsets also overlaps conceptually as a pipeline tool.

Naming Consistency3/5

Naming is partially consistent: image tools follow a verb_noun pattern (remove_background, restore_face, upscale_image), and document tools share a 'document_' prefix. However, the document tools mix noun_verb (document_extract, document_query) with noun_noun (document_tables) and document_to_markdown deviates with a preposition. This mixed convention reduces predictability.

Tool Count5/5

With 10 tools, the count is well within the ideal 3-15 range. Each tool addresses a meaningful capability, from document parsing to image enhancement, without feeling redundant or excessive. The scope is appropriate for a multi-purpose image/document API.

Completeness4/5

The surface covers core workflows: document structuring (extract, markdown, tables, query), image enhancement (upscale, background removal, face restore), and health checks. Minor gaps include lack of explicit image format conversion or document deletion, but these are not essential for the stated purpose. Overall, the tools form a coherent set with no obvious dead ends.

Resources