Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

opa_get_price

Get the current real-time spot price for any energy commodity by name or code. Returns price, currency, 24h change, and timestamp.

Instructions

Get the current real-time spot price of an energy commodity. Use when the user asks about a single commodity's current price. Accepts natural language ('brent oil', 'diesel') or API codes ('WTI_USD'). Returns price, currency, 24h change, and timestamp. For multiple commodities at once, use opa_market_overview. For price trends, use opa_get_history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commodityYesCommodity name or code (e.g., 'brent oil', 'natural gas', 'WTI_USD', 'diesel')
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses that the tool returns price, currency, 24h change, and timestamp, which gives context on the output. However, it does not mention any potential side effects, latency, or data freshness, but for a read-only query this is acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, each serving a distinct purpose: stating functionality, specifying usage context, and listing alternatives. No redundant information.

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 simple tool with one parameter and no output schema, the description sufficiently covers purpose, usage guidance, return data, and alternatives, leaving no obvious gaps.

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 coverage is 100% and the description adds meaningful examples (e.g., 'brent oil', 'diesel', 'WTI_USD') to help the agent understand accepted input formats, going beyond the schema's generic description.

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 it retrieves the current real-time spot price of a single energy commodity. It distinguishes itself from siblings by specifying scope (single vs multiple) and mentioning alternatives like opa_market_overview and opa_get_history.

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?

Explicitly tells when to use: 'Use when the user asks about a single commodity's current price.' Also provides clear alternatives: 'For multiple commodities at once, use opa_market_overview. For price trends, use opa_get_history.'

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/OilpriceAPI/mcp-server'

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