pyrestoolbox-mcp
v0.1.0MCP server exposing the pyrestoolbox reservoir engineering library to AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_functions
List pyrestoolbox modules, or the public functions of one module. With no argument, returns {module: description}. With a module name (e.g. 'gas'), returns {function: one-line summary} for every public function and class in that module.
| Parameter | Type | Description |
|---|---|---|
module | string |
describe
Signature and full docstring for a public function or class. name is 'module.function', e.g. 'gas.gas_z' or 'dca.fit_decline'. Also see the docs://<module> resources for worked examples. Units live in the docstring, not the signature, which is why annotations are stripped below. A parameter documented `(deg F | deg C)` takes the first under the default and the second when metric=True; the parameter name itself never changes.
| Parameter | Type | Description |
|---|---|---|
name * | string |
call
Call any public pyrestoolbox function with keyword arguments. name is 'module.function', e.g. 'gas.gas_z'. arguments is a JSON object of keyword arguments, e.g. {"p": 2000, "sg": 0.75, "degf": 200}. That example is oilfield units. With {"metric": true} the same keys take metric values, so `degf` would be deg C and `p` barsa; the names do not change. Call describe(name) first and read its unit notation: `(deg F | deg C)` means field first, metric second. Correlation methods are strings (e.g. "zmethod": "DAK"); an invalid method string returns an error listing th…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
arguments |
recommend_methods
Recommend correlation methods for a fluid/well, with rationale. Composition fractions are molar. api: stock tank oil gravity (include to get oil PVT method recommendations). deviation: max wellbore deviation from vertical (degrees). well_type: 'gas' or 'oil'. Returns one recommendation per category (zmethod, cmethod, vlp_method, ...), each with the recommended method, rationale, alternatives and whether the choice is mandatory.
| Parameter | Type | Description |
|---|---|---|
api | ||
co2 | number | |
deviation | number | |
h2 | number | |
h2s | number | |
he | number | |
n2 | number | |
sg | number | |
well_type | string |
co2_brine_props
CO2-saturated brine properties (Spycher-Pruess mutual solubility). pres: pressure (psia, or barsa if metric=True). temp: temperature (deg F, or deg C if metric=True). ppm: NaCl-equivalent salinity (weight salt per million weight of brine). cw_sat=True also computes the saturated pseudo-compressibility. Returns aqueous/vapor compositions, gas density (g/cm3), brine density/viscosity/Bw triplets [CO2-saturated, pure brine, freshwater], Rs and compressibilities.
| Parameter | Type | Description |
|---|---|---|
pres * | number | |
temp * | number | |
cw_sat | boolean | |
metric | boolean | |
ppm | number |
sw_brine_props
Multicomponent gas-saturated brine properties (Soreide-Whitson VLE). pres: pressure (psia, or barsa if metric=True). temp: temperature (deg F, or deg C if metric=True). ppm: NaCl-equivalent salinity. y_*: molar fractions of CO2/H2S/N2/H2/He in the equilibrium gas; the remainder is hydrocarbon gas of specific gravity sg. Returns aqueous composition, brine density/viscosity triplets, Rs, water content and compressibilities.
| Parameter | Type | Description |
|---|---|---|
pres * | number | |
temp * | number | |
cw_sat | boolean | |
metric | boolean | |
ppm | number | |
sg | number | |
y_CO2 | number | |
y_H2 | number | |
y_H2S | number | |
y_He | number | |
y_N2 | number |
fit_and_forecast
Fit a decline model to rate-time data and forecast to t_end. t: time array. q: rate array (same length; any consistent units - the dca module is unit-agnostic). method: 'best' (excludes 'mh'/'hyp2'), 'exponential', 'harmonic', 'hyperbolic', 'duong', 'mh' or 'hyp2'. Forecast runs from the fitted model at dt spacing until t_end or until rate falls to q_min. Returns fitted parameters (qi, di, b, ...), r_squared, EUR and the forecast t/q/cumulative arrays.
| Parameter | Type | Description |
|---|---|---|
q * | array | |
t * | array | |
t_end * | number | |
dt | number | |
method | string | |
q_min | number |
read_docs
Full documentation for one module: function list, signatures, input and return tables, and worked examples whose printed outputs the test suite verifies. topic is a module name ('gas', 'oil', 'nodal', ...), 'index' for the map of engineering tasks to functions, or 'changelist' for release history. Same content as the docs:// resources, for hosts that do not surface resources. Prefer describe() for one function; read_docs for the background, method choices and examples.
| Parameter | Type | Description |
|---|---|---|
topic | string |
search
Find functions for an engineering task, best match first. query is plain words, e.g. 'liquid loading', 'hydrate inhibitor dose', 'z factor sour gas', 'black oil table', 'erosional velocity'. Matches the documentation's task index plus every public function's name and summary. Returns {matches: [{name, summary, task}]}; then describe(name) and call it. Names starting 'tool:' are the one-shot tools of this server.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |