pyrestoolbox-mcp

v0.1.0
pyrestoolbox-mcp Checked 10 hours ago Published 14 days ago

MCP 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.

ParameterTypeDescription
modulestring

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.

ParameterTypeDescription
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…

ParameterTypeDescription
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.

ParameterTypeDescription
api
co2number
deviationnumber
h2number
h2snumber
henumber
n2number
sgnumber
well_typestring

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.

ParameterTypeDescription
pres *number
temp *number
cw_satboolean
metricboolean
ppmnumber

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.

ParameterTypeDescription
pres *number
temp *number
cw_satboolean
metricboolean
ppmnumber
sgnumber
y_CO2number
y_H2number
y_H2Snumber
y_Henumber
y_N2number

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.

ParameterTypeDescription
q *array
t *array
t_end *number
dtnumber
methodstring
q_minnumber

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.

ParameterTypeDescription
topicstring