Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

weighted_average_gas_sg

Calculate weighted average gas specific gravity from separator stages for surface facility design and gas sales allocation using separator and stock tank gas properties.

Instructions

Calculate weighted average gas specific gravity from separator stages.

SURFACE FACILITIES CALCULATION - Combines gas gravities from separator and stock tank weighted by GORs.

Use Cases:

  • Multi-stage separation optimization

  • Surface facility design

  • Gas sales allocation

  • Material balance

Formula: sg_avg = (sg_sp * rsp + sg_st * rst) / (rsp + rst)

Returns weighted average gas SG (dimensionless, air=1).

Args: request: Separator and stock tank gas properties

Returns: Dictionary with weighted average SG and breakdown

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the calculation formula and return format (dictionary with weighted average SG and breakdown), which is helpful. However, it doesn't mention error handling, numerical precision, or validation of input ranges beyond what the schema's exclusiveMinimum/minimum hints at.

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?

Well-structured with clear sections (purpose, use cases, formula, args, returns). Every sentence earns its place, though the 'Args' and 'Returns' sections slightly duplicate information that could be inferred from the formula and context.

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 calculation tool with no annotations but an output schema, the description is quite complete. It explains the purpose, use cases, mathematical formula, parameter roles, and return structure. The main gap is lack of explicit error/edge-case handling, but the formula and parameter constraints provide reasonable coverage.

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?

Schema description coverage is 0%, so the description must fully compensate. It provides the exact formula showing how all four parameters (sg_sp, rsp, sg_st, rst) interact, defines units (scf/stb), and explains the weighted averaging logic. This adds substantial meaning beyond the bare schema.

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 specific action ('Calculate weighted average gas specific gravity'), identifies the resource ('from separator stages'), and distinguishes from siblings by focusing on a multi-stage separation calculation. Unlike tools like 'gas_sg_from_composition' or 'stock_tank_gas_sg', this explicitly handles weighted averaging across stages.

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?

The 'Use Cases' section provides clear context for when to use this tool (multi-stage separation optimization, surface facility design, gas sales allocation, material balance). However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools for simpler single-stage calculations.

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