Skip to main content
Glama

check_physics_contracts

Validate simulation KPI values against design contracts (range, threshold, exact, pct_change) using direct JSON or saved capsule data, and generate a Markdown validation report.

Instructions

Check physics contracts against KPI values from a capsule or direct JSON.

Validates that simulation results meet design requirements defined as contracts (range, threshold, exact, pct_change). Supports two modes:

  1. Direct mode: provide contracts_json and kpis_json directly.

  2. Capsule mode: provide contracts_json and capsule_id to load KPIs from a previously saved experiment capsule.

Args: contracts_json: JSON array of contract dicts. Each dict must have contract_id, kpi_name, contract_type. Optional: expected, tolerance, severity, description. kpis_json: JSON object mapping KPI names to values, e.g. {"max_stress": 345.6}. Required if capsule_id is empty. capsule_id: Load KPIs from this capsule instead of kpis_json.

Contract types: - range: value must be within [min, max] - threshold_gt: value must be greater than X - threshold_lt: value must be less than X - exact: value must equal X (within tolerance) - pct_change: change from baseline must be within X%

Returns: Markdown-formatted contract validation report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kpis_jsonNo
capsule_idNo
contracts_jsonYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains the validation behavior, both input modes, contract type semantics, and the Markdown report output. It does not explicitly state whether the operation is side-effect-free or how failures are surfaced, but the 'check/validates/returns report' framing makes the core behavior clear.

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 well-organized and efficient: purpose first, then modes, parameter details, contract types, and return value. No sentence is wasted, and the structure makes the information easy for an agent to parse.

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 3-parameter tool with no annotations and a bare schema, this description is complete. It covers the tool's purpose, both execution modes, every parameter's role, contract validation semantics, and the output format. An agent has enough information to select and invoke the tool 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?

Schema description coverage is 0%, and the description fully compensates. It defines contracts_json structure and required/optional fields, explains kpis_json with an example, and clarifies the capsule_id alternative. It also documents all five contract types, giving the agent enough detail to construct valid inputs.

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 opens with a specific verb and object: 'Check physics contracts against KPI values', immediately clarifying the resource and operation. It further details that this validates simulation results against design requirements, distinguishing it from sibling tools like check_model_integrity or compare_capsules.

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?

The description clearly explains when to use direct mode versus capsule mode, including that kpis_json is required if capsule_id is empty. It does not explicitly mention sibling alternatives or state when not to use the tool, but the mode-level guidance is concrete and actionable.

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