Skip to main content
Glama

frs__AddFacesByBase64

Adds faces from a Base64-encoded image to a face set, optionally selecting only the largest face or all faces.

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": {
      "face_set_name": "<face_set_name>",
      "image_base64": "<image_base64>",
      "project_id": "<project_id>"
    },
    "name": "frs__AddFacesByBase64"
  }
}

Input Schema

NameRequiredDescriptionDefault
singleNo是否将图片中的最大人脸添加至人脸库。可选值包括:
project_idYes项目ID,获取方法请参见[获取项目ID/账号租户名/AK/SK](https://support.huaweicloud.com/api-face/face_02_0056.html)。
image_base64Yes图像数据,Base64编码,要求:
face_set_nameYes人脸库名称。
external_fieldsNo根据用户自定义数据类型,填入相应的数值。创建faceset时定义该字段,Json字符串不校验重复性,参考[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。
external_image_idNo用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. Beyond implying a write into the face set, it says nothing about duplicate external_image_id handling, capacity limits, behavior when the image contains no detectable face, or permission requirements.

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, front-loaded with the action and the resource, with no filler. The second sentence partly restates the first but earns part of its place by introducing the largest-face/all-faces mode.

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

Completeness2/5

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

This is a 6-parameter mutating tool with a nested object and no annotations or output schema, yet the description does not mention what is returned (face_id, failure reasons), how external user data fields behave, or preconditions for the face set. Too thin for the complexity involved.

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 description coverage is 100%, so the baseline is 3. The description adds a little on the `single` toggle by saying either the largest face or all faces are added, which helps because that schema field's own description is truncated ('可选值包括:'), but it says nothing about external_image_id or external_fields.

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 clear verb+resource (add a face into the face set) and the input medium (a single image's face), which separates it from the Detect/Search/Compare families. It does not explicitly say 'Base64-encoded image' or name the ByFile/ByUrl alternatives, so sibling differentiation rests on the tool name rather than the prose.

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 guidance on when to choose this over frs__AddFacesByFile or frs__AddFacesByUrl, and no stated prerequisites (an existing face set, required project_id). The only contextual hint is '支持添加最大人脸或所有人脸', which explains a mode rather than when to use the tool.

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