Skip to main content
Glama

Declare Performance

declare_performance
Destructive

Record quantitative performance requirements like drag, pressure, or frequency for a part to re-verify them after edits.

Instructions

Record a quantitative PERFORMANCE spec on a part so it can be re-proved after every edit — the performance twin of declare_intent, which only covers geometry. Persists in the .FCStd as a JSON property bag; one contract per part, re-declaring replaces it.

Each requirement is metric-agnostic — the contract layer only orchestrates, so the metric is whatever the named tool already returns, and "Cd ≤ 0.30", "Δp ≤ 50 Pa", "first mode ≥ 200 Hz" and "ΔT ≤ 40 K" are the same machinery:

{"name": "drag_at_cruise",
 "metric": "cd",                        # dotted path into the tool's result
 "tool": "cfd_external_flow_submit",    # what measures it at solver tier
 "conditions": {"model": "$handle", "velocity_m_s": 30, "fluid": "air-20c"},
 "limit": {"max": 0.30},                # max, min, or both (a window)
 "screen": {"tool": "cfd_body_drag", "metric": "cd",
            "conditions": {"shape": "sphere", "diameter_mm": 50,
                           "velocity_m_s": 30}},
 "fidelity_floor": "solver",            # "screen" if an estimate is proof enough
 "trust": {"converged": true, "band_max_pct": 5}}

"$handle" anywhere in conditions is replaced with this part's handle at verification time, so a contract is portable between parts. trust demands are enforced by verify_performance against the solver's own trust block: a requirement asking for converged: true can never be satisfied by an unconverged solve.

Returns {handle, contract: {requirements: [...]}, n_requirements}. Raises ValueError on a malformed requirement, naming the offending one.

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>",
      "requirements": "<requirements>"
    },
    "name": "declare_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
handleYes
workspaceNoRun this call in this named workspace
requirementsYes

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.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false; the description adds the specific mechanism that makes it destructive — the contract persists in the .FCStd as a JSON property bag with one contract per part, and re-declaring replaces the prior one. It also discloses that trust demands are enforced by verify_performance against the solver's trust block, and that malformed requirements raise ValueError naming the offender.

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 purpose and the declare_intent contrast, then moves into the contract shape; the code block is long but is the only place the requirement structure is defined. The 'metric-agnostic' preamble and the four example metrics partially restate the same idea, a minor redundancy but not wasted space given the untyped schema.

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?

There is no output schema, yet the description gives the return shape ({handle, contract: {requirements: [...]}, n_requirements}) and the error behavior. Combined with the worked example covering the untyped `requirements` parameter, an agent has everything needed to construct a valid call.

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 only 33% and `requirements` is an untyped array with no item schema, so the description must carry the load — and it does, with a fully annotated example covering name, metric, tool, conditions, limit (max/min/window), screen, fidelity_floor and trust. It also documents the `$handle` substitution semantics that make a contract portable, which is nowhere in the schema.

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 ('Record a quantitative PERFORMANCE spec on a part') plus the outcome ('so it can be re-proved after every edit'). It explicitly distinguishes itself from the closest sibling by naming declare_intent and scoping it to geometry only, so an agent can route between the two without opening either schema.

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?

Gives clear context for use: declare once per part, re-declare to replace, and the contract is later enforced by verify_performance. It does not spell out explicit when-not-to-use conditions (e.g. what to do if no metric tool exists yet), but the sibling relationship to declare_intent and verify_performance is unambiguous.

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