Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

opa_get_diesel_by_state

Retrieve current average retail diesel prices for any US state. Use state names or 2-letter codes to access AAA-sourced data covering all 50 states and DC.

Instructions

Get the current average retail diesel price for a US state. Use when the user asks about diesel prices in a specific state, diesel fuel costs by state, or state-level fuel prices. Accepts state names ('California') or 2-letter codes ('CA'). Returns the AAA-sourced state average diesel price. Covers all 50 states plus DC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesUS state name or 2-letter code (e.g., 'California', 'CA', 'Texas', 'TX')
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses data source (AAA-sourced), geographic coverage (50 states plus DC), and input format flexibility. Missing error handling behavior and currency units, but covers essential behavioral traits for a read-only data tool.

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 with zero waste: purpose (sentence 1), usage trigger (sentence 2), input format (sentence 3), source/coverage (sentence 4). Front-loaded and efficiently structured.

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 single-parameter retrieval tool without output schema, description adequately covers return value ('Returns the AAA-sourced state average diesel price'), data provenance, and geographic scope. No gaps given the tool's simplicity.

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 coverage is 100%, providing complete parameter documentation. Description reinforces input options ('California' or 'CA') but adds no semantic meaning beyond the schema's examples. Baseline 3 appropriate when schema does heavy lifting.

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+resource: 'Get the current average retail diesel price for a US state.' Clearly distinguishes from siblings like opa_get_marine_fuels or opa_get_futures by specifying 'retail diesel' and 'US state' scope.

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?

Provides explicit when-to-use: 'Use when the user asks about diesel prices in a specific state, diesel fuel costs by state, or state-level fuel prices.' Lacks explicit when-not-to-use or named alternatives, but the specific scope implies distinction from broader tools like opa_get_price or opa_compare_prices.

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