Skip to main content
Glama

frs__CompareFaceByBase64

Compares two Base64-encoded face images to determine whether they depict the same person and returns a confidence score; selects the largest face if multiple are present.

Instructions

[FRS] 人脸比对是将两个人脸进行比对,来判断是否为同一个人,返回比对置信度。如果传入的图片中包含多个人脸,选取最大的人脸进行比对。

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": {
      "image1_base64": "<image1_base64>",
      "image2_base64": "<image2_base64>",
      "project_id": "<project_id>"
    },
    "name": "frs__CompareFaceByBase64"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idYes项目ID,获取方法请参见[获取项目ID/账号租户名/AK/SK](https://support.huaweicloud.com/api-face/face_02_0056.html)。
image1_base64Yes图像数据,Base64编码,要求:
image2_base64Yes图像数据,Base64编码,要求:

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations present, the description carries the full disclosure burden, and it does add real behavior: the return is a comparison confidence, and when multiple faces appear the largest is selected. It omits how the confidence should be interpreted against a threshold, what errors occur on no-face detection, and image encoding/size constraints, so the safety and failure profile remains unclear.

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

Conciseness4/5

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

Two short sentences with the core purpose front-loaded and the multi-face edge case appended; nothing is wasted. The opening '人脸比对是将两个人脸进行比对' is mildly circular but does not impede reading.

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?

With three required parameters, no annotations, and no output schema, the description must cover both behavior and the return value; it names the confidence score but leaves its interpretation, error conditions, and image requirements unstated. Adequate to attempt a call, insufficient to use the result confidently.

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 reported at 100%, so the baseline is 3 and the description adds nothing about the parameters. Notably the two image fields carry only a truncated hint ('图像数据,Base64编码,要求:'), so the description could have compensated with actual encoding and size requirements but does not.

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 description states a concrete verb and resource — comparing two faces to determine whether they are the same person — and adds that a confidence score is returned, which lets an agent distinguish this from detection or search siblings. It never explicitly contrasts itself with CompareFaceByFile/ByUrl or SearchFaceByBase64, so sibling differentiation is left to the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of when this is preferable to the file/url comparison variants or to a search-based identity lookup, and no prerequisites such as an existing face set or required permissions. The agent must infer the applicability from the tool name alone.

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

Deploy Server

Other Tools