Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

Get EIA Oil Inventories

opa_get_oil_inventories
Read-only

Get EIA weekly petroleum inventory figures for crude and refined products. Choose a summary for week-over-week changes or a product-level breakdown to assess inventory builds and draws.

Instructions

Get the latest EIA weekly petroleum inventory (stocks) data. Use when the user asks about oil inventories, crude stocks, weekly EIA stocks, inventory builds/draws, or product-level inventory levels. Returns the latest weekly figures available to the account; optionally a summary view or a breakdown by petroleum product. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewNoWhich view to return: latest (most recent weekly snapshot), summary (headline totals + week-over-week change), or by_product (breakdown per petroleum product). Default: latest.latest

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.2.0
  2. Removedv3.0.0
  3. Addedv2.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds useful behavioral context: an eligible account entitlement is required, data returned is scoped to what is available to the account, and the API response is authoritative. No contradiction with annotations.

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 organized and front-loaded: it opens with the core purpose, then gives usage triggers, output options, and access requirements. All four sentences carry useful information without excessive wordiness.

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 single-parameter, read-only tool with no output schema, the description adequately covers what is returned, optional views, and access requirements. It could specify exact data fields or product list, but the available context is sufficient for correct selection and invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the single view parameter is already fully documented with its enum values and default. The description reinforces 'summary view or breakdown by petroleum product,' but does not add meaning beyond the 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 states a specific action and resource: 'Get the latest EIA weekly petroleum inventory (stocks) data.' It clearly distinguishes the tool from siblings like opa_get_storage or opa_get_opec_production by naming the exact domain (EIA weekly petroleum stocks) and including product-level inventory levels.

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 description gives explicit when-to-use triggers: 'Use when the user asks about oil inventories, crude stocks, weekly EIA stocks, inventory builds/draws, or product-level inventory levels.' It also names opa_get_plans for account access/pricing questions, though it does not explicitly contrast this tool with data-focused alternatives.

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