Skip to main content
Glama
kompas-mcp

kompas-mcp

by biryak

Edit / delete feature

feature_edit
Destructive

Modify an existing KOMPAS-3D feature by changing its parameters, renaming it, excluding it from calculation, or deleting it, with automatic backup and single-step undo if verification fails.

Instructions

Change an existing feature: params = its parameters, as listed by inspect_model(obj=…) under definition.params / editable — extrusion {depth, depth2, direction normal|reverse|both|middle, through, sketch}, revolve {angle, axis}, fillet {radius}, chamfer {distance, angle}, shell {thickness, outward}, hole {diameter, depth, through}, circular_pattern {count, step (null = even over 360°), axis}, linear_pattern {count, step, axis}, offset_plane {offset, reverse}, sketch {: mm or an expression such as a part variable name}; one Ctrl+Z, and the call is rolled back if this or any other feature breaks. To keep a parameter driven by a part variable use variables_set(expr) instead. Also: rename, exclude from / include in the calculation, or delete (delete=true: dependent features may break — then the call is rolled back; ask the user before deleting anything they built). NOTE: renaming is not undoable by Ctrl+Z in KOMPAS. Returns a receipt: created object handles, volume/mass before and after, backup path. The whole call is ONE Ctrl+Z for the user; if verification fails the model is restored and VERIFY_FAILED is returned.

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": {
      "doc": "<doc>",
      "obj": "<obj>"
    },
    "name": "feature_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYesDocument handle from doc_list/doc_open, e.g. 'doc:12001:0a1b2c3d'
objYesobj: handle from inspect_model/receipt, or '$N' inside batch
deleteNodelete the feature
paramsNonew parameter values, e.g. {'depth': 15, 'direction': 'reverse'}
renameNonew meaningful name
excludeNotrue = exclude from calculation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / params
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "new parameter values, e.g. {'depth': 15, 'direction': 'reverse'}",
      +  "title": "Params"
      +}
  2. First observedv0.4.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description adds substantial behavior beyond them: single Ctrl+Z rollback semantics, dependent-feature breakage, non-undoable rename, verification failure with VERIFY_FAILED, and receipt contents. This is exactly the kind of context an agent needs before mutating a model.

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?

The description front-loads the main purpose and every sentence carries useful information, but it is a dense single paragraph. The long feature-type list and caveats would be easier to scan as structured bullets, though no sentence is wasted.

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 complex, destructive edit tool with no output schema, the description covers rollback, return receipt contents, verification failure, deletion risk, and rename limitations. Nothing critical to correct invocation is missing.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds feature-specific parameter vocabularies and semantics not present in the schema: extrusion/revolve/fillet/chamfer/shell/hole/pattern/offset_plane/sketch fields, step=null meaning even spacing over 360 degrees, and expression syntax for sketch dimensions. This meaning materially improves correct parameter construction.

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 and resource: change an existing feature, and enumerates the editable feature kinds plus rename/exclude/delete. It explicitly routes variable-driven parameters to variables_set, letting an agent distinguish this tool from that sibling.

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

Usage Guidelines5/5

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

Explicitly says when to use params versus variables_set(expr), warns to ask the user before deleting built features, and explains the effects of delete and rename. The alternatives and conditions are named rather than implied.

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