Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

opa_get_price

Retrieve real-time spot prices for energy commodities by entering names like 'brent oil' or codes like 'WTI_USD'. Returns current price, currency, 24-hour 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 provided, so description carries full burden. It successfully discloses key behavioral traits: real-time nature of data, input format flexibility (natural language vs API codes), and output structure (price, currency, 24h change, timestamp). Missing only operational details like caching or rate limits.

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?

Four sentences, perfectly structured: purpose first, usage condition second, input semantics third, alternatives fourth. No redundant words; every sentence earns its place by conveying distinct information not present in other sentences.

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?

Excellent completeness for a single-parameter tool. Compensates for missing output schema by detailing return values. Explicitly differentiates from 11 siblings (particularly opa_market_overview and opa_get_history). With only one required parameter and clear scope, no additional context is needed.

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

Parameters4/5

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

Schema coverage is 100% (1 parameter fully documented), establishing baseline of 3. Description adds valuable semantic context beyond the schema by emphasizing the dual input format support (natural language vs codes) with clear examples, helping agents understand how to formulate the commodity parameter.

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?

Description opens with specific verb ('Get') and resource ('current real-time spot price of an energy commodity'), explicitly scopes to single commodities, and distinguishes from sibling tools like opa_market_overview by noting it handles 'single commodity' vs multiple.

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 states when to use ('when the user asks about a single commodity's current price') and names two specific alternatives for other use cases ('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/oil-price-api'

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