Skip to main content
Glama
loumalouomega

Kratos MCP Server

create_cosim_project

Scaffold a coupled-solver co-simulation case by defining solvers, interface-data couplings, and convergence options, ready to run with the Kratos simulation runner.

Instructions

Scaffold a CoSimulation (coupled-solver) case: several solvers exchanging interface data inside every time step, run with run_simulation like any case (the runner drives it through CoSimulationAnalysis). Needs KratosCoSimulationApplication.

'solvers' is a list of {"name", "type", "data", "parameters"?, "input_file"?}. 'type' is a CoSimulation wrapper module ('solver_wrappers.kratos.structural_mechanics_wrapper', ...) or the shorthands 'sdof' / 'sdof_static' (Python-only single-degree-of-freedom solvers: no mesh, ideal for learning/testing couplings). 'data' maps an interface-data name to {"model_part_name", "variable_name", "location"?} ('sdof' data gets "location": "model_part" automatically). Give 'parameters' to have the solver's own parameter file written to .json, or 'input_file' to reference one already in the directory.

'couplings' is a list of {"from_solver", "from_data", "to_solver", "to_data", "operator"='copy', "options"=[]} (options e.g. 'swap_sign'). 'order' is the coupling sequence (default: solver order); a coupling whose producer comes first is exchanged right after the producer solves, otherwise right before the consumer solves (previous iteration's value). 'coupled_solver' is 'gauss_seidel_weak' (one pass per step) or a strong variant ('gauss_seidel_strong', 'jacobi_strong') that iterates until every entry of 'convergence_criteria' (e.g. {"type": "relative_norm_initial_residual", "solver": s, "data_name": d, "abs_tolerance": 1e-10, "rel_tolerance": 1e-8}) holds, optionally accelerated by 'convergence_accelerators' (e.g. {"type": "aitken", "solver": s, "data_name": d}). The result is statically validated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNo
solversYes
end_timeNo
couplingsYes
directoryYes
start_timeNo
coupled_solverNogauss_seidel_weak
convergence_criteriaNo
data_transfer_operatorsNo
num_coupling_iterationsNo
convergence_acceleratorsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations, so the description carries the full behavioral burden. It does disclose real traits: static validation of the result, that 'parameters' causes a <name>.json file to be written, that 'sdof' data gets "location": "model_part" injected automatically, and default fallbacks for order/coupled_solver. It omits destructive/overwrite behavior on 'directory', prerequisites beyond the application, and failure modes.

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 dense per-key explanations. It is long, but for an 11-parameter nested-argument tool nearly every clause earns its place; the only mild drag is the unbroken paragraph layout.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the description covers the hard nested structures and their interaction rules (ordering semantics, weak vs strong coupled_solver). Gaps remain on the scalar timing params and 'data_transfer_operators', which are the main incompleteness for a tool of this complexity.

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 0%, so the description must compensate, and it substantially does: it documents the shapes of 'solvers', 'couplings', 'order', 'coupled_solver', 'convergence_criteria' and 'convergence_accelerators' with concrete examples. It leaves 'directory', 'start_time', 'end_time', 'num_coupling_iterations' and 'data_transfer_operators' undocumented, so it is strong but not complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: scaffolding a CoSimulation (coupled-solver) case where several solvers exchange interface data per time step. It even clarifies it runs via run_simulation like any case. However it never names or contrasts with the obvious siblings (create_fsi_project, create_multistage_project), so the agent must infer which case-builder to use.

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

Usage Guidelines3/5

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

Gives context (run with run_simulation, needs KratosCoSimulationApplication) but no explicit when-to-use vs when-not-to-use, and no routing away from sibling project creators. Usage is implied through the coupling/solver structure rather than stated.

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