Skip to main content
Glama
0xFFD

openfoam-mcp

by 0xFFD

write_file

Create or overwrite files in an OpenFOAM case, including dictionaries, text inputs, and scripts. Use for new files; prefer set_dict for edits.

Instructions

Create or overwrite a file in a case (new dictionaries, STL-free text inputs, scripts). Prefer set_dict for edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseYesCase name in the workspace (e.g. 'pitzDaily') or an absolute path inside an allowed root.
pathYesFile path relative to the case.
appendNo
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is largely pre-supplied. The description usefully discloses that existing content is overwritten rather than merged, though this sits in mild tension with destructiveHint=false, and it says nothing about whether parent directories are created, allowed-root enforcement, or 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?

Two tight sentences, front-loaded with the primary action and the routing hint second. The parenthetical list is slightly idiosyncratic ('STL-free text inputs') but does real work and costs little space.

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?

For a simple write tool with no output schema this covers the essentials: what it writes, that it overwrites, and where to go for edits. Remaining gaps (append behavior, path/root constraints, return value) are minor but not fully closed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: 'case' and 'path' are documented in the schema, while 'append' and 'content' are not. The description hints at content types but never mentions the append flag, so it does not compensate for the uncovered parameters; baseline 3 for the partial coverage is appropriate.

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+resource ('Create or overwrite a file in a case') and even enumerates the file categories it targets (dictionaries, text inputs, scripts). It explicitly names the sibling it is not (set_dict for edits), so an agent can distinguish it 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?

'Prefer set_dict for edits' gives a clear alternative with the condition that selects it. It does not cover other plausible alternatives such as import_file (for binary/existing assets) or read_file/modify flows, so guidance is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.