Skip to main content
Glama
loumalouomega

Kratos MCP Server

run_simulation

Start a Kratos simulation as a background job and return its job_id. Configure analysis type, MPI ranks, or wait seconds to track progress and status.

Instructions

Start a Kratos simulation as a background job and return its job_id. The analysis class is taken from the 'analysis_stage' key in the parameters, or inferred from solver_type; override with analysis_type (structural/fluid/thermal/potential_flow) or analysis_class ('module.path:ClassName'). If wait_seconds > 0, poll up to that long and return the final status if the job finishes in time. Track progress with job_status/job_logs.

mpi_ranks launches the case under an MPI launcher (mpiexec/mpirun, or KRATOS_MPI_LAUNCHER) with that many ranks; the case must set problem_data.parallel_type to "MPI" and the build must have MPI support, otherwise the call fails before any job is created. Rank 0 logs to the job log; other ranks to job_logs(rank=N). omp_threads sets OMP_NUM_THREADS/MKL_NUM_THREADS. Not supported for multi-stage or CoSimulation or FSI cases, checkpoints or studies.

Multi-stage (orchestrator + stages), CoSimulation (coupled solver in solver_settings, see create_cosim_project) and partitioned FSI (solver_type 'partitioned', see create_fsi_project) cases are detected automatically; CoSimulation needs KratosCoSimulationApplication and FSI needs KratosFSIApplication (plus fluid, structural, mesh-moving and mapping applications).

Input Schema

NameRequiredDescriptionDefault
isolateNo
case_dirYes
mpi_ranksNo
omp_threadsNo
wait_secondsNo
analysis_typeNo
analysis_classNo
external_inputsNo
parameters_fileNoProjectParameters.json

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.0
    • addedInput schema / properties / mpi_ranks
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Mpi Ranks"
      +}
    • addedInput schema / properties / omp_threads
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Omp Threads"
      +}
  2. Changed2 schema fields changedv0.5.0
    • addedInput schema / properties / external_inputs
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "External Inputs"
      +}
    • addedInput schema / properties / isolate
      Added value: +{
      +  "default": false,
      +  "title": "Isolate",
      +  "type": "boolean"
      +}
  3. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so well: async job semantics, wait_seconds polling behavior, MPI preconditions that cause failure before job creation, per-rank log routing, env-var effects of omp_threads, and auto-detection of multi-stage/CoSim/FSI cases.

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?

Dense but organized into three topical paragraphs with the core action front-loaded; long, yet nearly every sentence carries operational detail an agent needs (MPI, threading, case-type detection).

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?

Complete for a launch tool: output schema covers return values, and the description supplies the failure modes, prerequisites, and case-type detection logic an agent needs to call it correctly without annotations.

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?

With 0% schema description coverage across 9 params, the description compensates by explaining analysis_type/analysis_class resolution, wait_seconds, mpi_ranks, and omp_threads. However, isolate, external_inputs, and parameters_file (default 'ProjectParameters.json') are never mentioned, leaving three parameters unexplained.

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 ('Start a Kratos simulation as a background job') plus the primary return value ('return its job_id'), which immediately distinguishes it from sibling job-inspection tools like job_status and job_logs.

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 routes the agent: track progress with job_status/job_logs, see create_cosim_project and create_fsi_project for those case types, and states the when-not conditions for mpi_ranks (multi-stage, CoSimulation, FSI, checkpoints, studies).

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