Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

oil_rate_linear

Calculate oil production rate for horizontal wells or linear flow geometries using Darcy's law with automated PVT property computation.

Instructions

Calculate oil production rate for linear flow.

INFLOW PERFORMANCE TOOL - Computes oil production rate for horizontal wells or wells with linear flow geometry using Darcy's law. Automatically calculates PVT properties (Rs, Bo, μo) at average pressure. Essential for horizontal well performance analysis and completion design.

Parameters:

  • pi (float, required): Initial/reservoir pressure in psia. Must be > 0. Example: 4000.0.

  • pb (float, required): Bubble point pressure in psia. Must be ≥ 0. Example: 3500.0. If pi < pb, reservoir is saturated (gas cap present).

  • api (float, required): Oil API gravity in degrees. Valid: 0-100. Example: 35.0.

  • degf (float, required): Reservoir temperature in °F. Valid: -460 to 1000. Example: 180.0.

  • sg_g (float, required): Gas specific gravity (air=1). Valid: 0-3. Typical: 0.6-1.2. Example: 0.75.

  • psd (float or list, required): Sandface/draining pressure(s) in psia. Must be > 0 and < pi. Can be scalar or array. Example: 1500.0 or [1000, 1500, 2000].

  • h (float, required): Net pay thickness in feet. Must be > 0. Typical: 10-200 ft. Example: 50.0.

  • k (float, required): Permeability in millidarcies (mD). Must be > 0. Typical: 1-1000 mD. Example: 100.0.

  • area (float, required): Cross-sectional flow area in square feet. Must be > 0. Typical: 100-10000 ft². Example: 1000.0.

  • length (float, required): Flow length in feet. Must be > 0. Typical: 100-5000 ft. Example: 500.0.

  • rsb (float, required): Solution GOR at bubble point in scf/stb. Must be ≥ 0. Example: 800.0.

Flow Geometry: Linear flow occurs in:

  • Horizontal wells (early-time flow)

  • Hydraulically fractured vertical wells (fracture flow)

  • Channelized reservoirs

  • Edge water drive systems

Darcy's Law Formula (Linear): qo = (0.001127 × k × area × (pi - pwf)) / (μo × Bo × length)

Where PVT properties (μo, Bo) are calculated at average pressure (pi + pwf)/2.

Linear vs Radial Flow:

  • Linear: Flow perpendicular to wellbore (horizontal wells)

  • Radial: Flow converging to wellbore (vertical wells)

  • Linear flow typically has higher productivity than radial

Returns: Dictionary with:

  • value (float or list): Oil rate in STB/day (matches input psd shape)

  • method (str): "Darcy linear flow"

  • units (str): "STB/day"

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Using separator temperature instead of reservoir temperature

  • Pressure in barg/psig instead of psia (must be absolute)

  • Confusing flow area (perpendicular to flow) with wellbore area

  • Using wrong flow length (should be distance from boundary to well)

  • Not accounting for net pay thickness correctly

  • Confusing linear flow (horizontal wells) with radial flow (vertical wells)

Example Usage:

{
    "pi": 4000.0,
    "pb": 3500.0,
    "api": 35.0,
    "degf": 180.0,
    "sg_g": 0.75,
    "psd": [1500, 2000, 2500],
    "h": 50.0,
    "k": 100.0,
    "area": 1000.0,
    "length": 500.0,
    "rsb": 800.0
}

Result: Oil rate decreases as sandface pressure increases (typical IPR curve).

Note: This tool automatically calculates PVT properties. You don't need to provide Rs, Bo, or μo - they are computed internally at average pressure. Linear flow is characteristic of horizontal wells and hydraulically fractured wells.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden and excels. It discloses that the tool automatically calculates PVT properties internally, explains the Darcy's law formula used, describes the return format in detail, and warns about common implementation errors like pressure unit requirements and geometry misunderstandings.

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?

The description is well-structured with clear sections (Parameters, Flow Geometry, Formula, Returns, Common Mistakes, Example) but is quite lengthy. While every section adds value, some information could be more condensed. It's front-loaded with the core purpose, but the detailed parameter explanations make it longer than ideal.

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?

For a complex tool with 11 parameters, no annotations, and 0% schema coverage, the description is exceptionally complete. It covers purpose, usage context, mathematical basis, parameter details, return format, common pitfalls, and includes a working example. The output schema exists, so the description appropriately focuses on behavioral context rather than repeating return structure.

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

Parameters5/5

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

Despite 0% schema description coverage, the description provides comprehensive parameter documentation. Each parameter gets a clear explanation with units, validity ranges, typical values, examples, and contextual notes (e.g., 'If pi < pb, reservoir is saturated'). This fully compensates for the schema's lack of descriptions.

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?

The description clearly states the tool calculates oil production rate for linear flow using Darcy's law, specifying it's for horizontal wells or wells with linear flow geometry. It distinguishes from sibling tools like 'oil_rate_radial' by explicitly contrasting linear vs radial flow in a dedicated section.

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?

The description provides explicit guidance on when to use this tool (horizontal wells, hydraulically fractured wells, channelized reservoirs, edge water drive systems) and when not to use it (radial flow for vertical wells). It includes a 'Common Mistakes' section that helps avoid misuse, such as confusing linear with radial flow or using wrong pressure units.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielserrao/pyrestoolbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server