Skip to main content
Glama

Sats4AI - Bitcoin-Powered AI Tools

restore_face

Restore blurry, damaged, or AI-generated faces to sharp, natural quality. Uses CodeFormer (NeurIPS 2022, state-of-the-art FID 32.65 on CelebA-Test). Adjustable fidelity — balance between quality enhancement and identity preservation. Background enhancement and upscaling are optional. Stable endpoint — model upgrades automatically as SOTA evolves. 25 sats per image, pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='restore_face'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "paymentId": "<paymentId>",
      "imageBase64": "<imageBase64>"
    },
    "name": "restore_face"
  }
}

Input Schema

NameRequiredDescriptionDefault
upscaleNoOutput upscale factor 1-4 (default 1). Size limit: width x height x upscale² up to 25MP, after a side under 512 px is enlarged to 512 px.
fidelityNoFidelity to input: 0.0 = max quality enhancement, 1.0 = max identity preservation (default 0.5)
paymentIdYesValid payment ID (must be paid)
resultKeyNoOptional. The resultKey from create_payment. Send it with the same arguments to get this result again after a timeout.
imageBase64YesBase64-encoded image containing faces (PNG, JPEG, WEBP) or data URI
face_upsampleNoUpsample restored faces (default true)
background_enhanceNoAlso enhance the background (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / upscale / description
      Previous value: -"Output upscale factor 1-4 (default 1)"New value: +"Output upscale factor 1-4 (default 1). Size limit: width x height x upscale² up to 25MP, after a side under 512 px is enlarged to 512 px."
  2. Changed2 schema fields changed
    • changedInput schema / properties / background_enhance / description
      Previous value: -"Also enhance the background (default true)"New value: +"Also enhance the background (default false)"
    • changedInput schema / properties / upscale / description
      Previous value: -"Output upscale factor 1-4 (default 2)"New value: +"Output upscale factor 1-4 (default 1)"
  3. Changed1 schema field changed
    • addedInput schema / properties / resultKey
      Added value: +{
      +  "description": "Optional. The resultKey from create_payment. Send it with the same arguments to get this result again after a timeout.",
      +  "type": "string"
      +}
  4. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the payment cost (25 sats per image via Bitcoin Lightning), that no API key is needed, and the fidelity tradeoff. It omits latency expectations, failure/refund behavior, and what is actually returned (an image payload vs. a job handle), which matter given no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, which is good, but several sentences are promotional padding ('NeurIPS 2022, state-of-the-art FID 32.65 on CelebA-Test', 'Stable endpoint — model upgrades automatically as SOTA evolves') that do not help an agent invoke the tool.

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

Completeness3/5

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

For a 7-parameter tool with no output schema and no annotations, the description covers the payment prerequisite and the fidelity concept but never states the return format or how results are retrieved (the resultKey retry path lives only in the schema). Adequate, but leaves real gaps an agent must discover by trial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description's 'Adjustable fidelity — balance between quality enhancement and identity preservation' and 'Background enhancement and upscaling are optional' largely restate facts already in the schema property descriptions and defaults, adding framing but no new parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource with scope: 'Restore blurry, damaged, or AI-generated faces to sharp, natural quality.' It clearly identifies the input domain (faces) and the outcome, which distinguishes it from generic siblings like deblur_image, though it never names that alternative explicitly.

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?

It states a concrete prerequisite workflow: 'Requires create_payment with toolName="restore_face"', which is genuinely useful routing information. However, it never says when NOT to use this tool or how it differs from deblur_image/edit_image for similar tasks, leaving the agent to infer that this is the face-specific option.

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.