ampl_read_files
Load AMPL model, data, and run files from the session directory, blocking hidden shell commands. Get warnings when loaded files include unchecked sub-files.
Instructions
Load .mod/.dat/.run files by path, resolved inside the session workdir.
Each file's contents are guard-checked exactly like a statement passed to
ampl_eval before AMPL is asked to load it: a shell statement hidden
inside a .run/.mod/.dat file is refused, not silently executed, subject
to the same AMPL_MCP_ALLOW_SHELL escape hatch.
That check stops at the file it is given. If the file itself loads
another file (include, commands, model, data) or a shared
library (load), AMPL executes THAT file's contents unchecked - a
shell there will run. Such statements are permitted deliberately and
reported in a top-level warnings list; read it and tell the user.
On a load failure, message is a human-readable string and the full
per-statement record is under detail.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ampl_read_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | ||
| data | No | ||
| model | No | ||
| session | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||