Skip to main content
Glama

Declare Performance

declare_performance
Destructive

Record quantitative performance requirements on a part so they can be re-verified after every edit, turning simulation results into enforceable contracts.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYes
requirementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it discloses concrete behaviors: persistence in the .FCStd as a JSON property bag, one contract per part with re-declaring replacing it, $handle substitution at verification time, trust enforcement by verify_performance, return shape, and ValueError on malformed requirements. This is rich and non-contradictory.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, then uses a well-commented example to explain the complex requirements structure. The length is justified by the schema gap and the complexity of the requirements object; no sentences are filler.

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?

Even without an output schema, the description states the return value, error behavior, persistence, replacement semantics, and trust/verification coupling. For a mutating tool with an underspecified schema, this is complete enough for an agent to call it and interpret results correctly.

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?

With 0% schema description coverage and an empty items schema for requirements, the description carries full responsibility. It provides a detailed example requirement object with fields, comments, allowed limit forms, fidelity_floor semantics, and trust enforcement, plus the meaning of $handle. This fully compensates for the missing schema descriptions.

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?

The description states a specific verb and resource: 'Record a quantitative PERFORMANCE spec on a part so it can be re-proved after every edit.' It also distinguishes itself from declare_intent, calling itself the 'performance twin' and noting declare_intent 'only covers geometry,' so an agent can tell them apart.

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?

The description explicitly names the alternative tool (declare_intent) and the dimension that selects between them: geometry vs. performance. It also gives the intended context ('so it can be re-proved after every edit') and notes the replacement behavior, making when-to-use clear.

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