Skip to main content
Glama

Annotate Face

annotate_face
Destructive

Assigns a persistent semantic role (inlet, outlet, sealing, wetted, ambient, mating) to a FreeCAD face so later edits and airtight checks use declared intent instead of raw geometry.

Instructions

Declare the semantic ROLE of a face — what it is FOR — so later edits can be checked against intent instead of re-derived from raw geometry. The role binds to the face's stable f_* tag and persists in the .FCStd as a JSON property bag (same mechanism as publish_interface); it survives save/reopen. Once declared, check_airtight_path accepts the role/name directly (e.g. inlet="inlet").

handle: the part. face: an f_* tag, 'FaceN', or int index of the face to annotate. role: one of 'inlet' | 'outlet' | 'sealing' | 'wetted' | 'ambient' | 'mating'. name: optional unique label for this annotation (default: the role, then role_2, role_3, …); re-using a name updates that annotation. meta: optional dict stored verbatim (e.g. {"spec": "32mm hose"}).

Returns a dict: {handle, name (the annotation key used), role, tag (the f_* the role is bound to), index ('FaceN' at annotation time), roles (sorted list of all annotation names now on the part)}.

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": {
      "handle": "<handle>",
      "face": "<face>",
      "role": "<role>"
    },
    "name": "annotate_face"
  }
}

Input Schema

NameRequiredDescriptionDefault
faceYes
metaNo
nameNo
roleYes
handleYes
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, and the description adds the important context that this is a persistent write: the role binds to the stable f_* tag and survives save/reopen, and re-using a name overwrites that annotation. That is exactly the overwrite/persistence detail an agent needs. Not covered: what happens to a previous role on the same face if a different role is declared, or any permissions/error behavior.

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?

Front-loaded with the purpose sentence, then a paragraph of behavioral context, then tight per-parameter bullets and a return-value line. Dense but every sentence carries information; the 'same mechanism as publish_interface' aside is a small digression but earns its place by anchoring persistence.

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?

For a 6-param mutation tool with no output schema, the description covers everything an agent needs: intent, persistence and overwrite semantics, the role enum, face identifier formats, name defaulting, meta passthrough, and the exact return dict fields. Annotation-level safety is already carried by destructiveHint.

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 coverage is only 17% and, critically, the role parameter has no enum in the schema — the description supplies the full value set ('inlet' | 'outlet' | 'sealing' | 'wetted' | 'ambient' | 'mating'). It also enumerates face's accepted forms (f_* tag, 'FaceN', int), explains name's defaulting/numbering scheme, and clarifies meta is stored verbatim. It does not mention the workspace parameter, though that one has a schema description.

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?

States a specific verb+resource — 'Declare the semantic ROLE of a face — what it is FOR' — and frames the downstream purpose (later edits checked against intent). This clearly distinguishes it from siblings like query_faces, resolve_face, classify_face_sides and list_face_roles, which inspect geometry rather than attach durable intent.

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

Usage Guidelines4/5

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

Explains the situation that motivates the call (so later edits check against intent rather than re-deriving from raw geometry) and names a concrete downstream consumer: check_airtight_path accepts the declared role/name such as inlet="inlet". It also states the update semantics for re-used names. It doesn't explicitly contrast with declare_intent/publish_interface beyond citing the shared storage mechanism, so no full when-not guidance.

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