Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

Get Diesel Price by State

opa_get_diesel_by_state
Read-only

Retrieve the current average retail diesel price for any US state using state name or code. Get AAA-sourced data for 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?

The annotations declare readOnlyHint=true and openWorldHint=true, and the description adds context beyond this by specifying the data source ('AAA-sourced') and coverage ('all 50 states plus DC'), which helps the agent understand reliability and scope. It does not describe potential failure modes, but given the annotations cover the safety profile, this is sufficient.

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?

The description is four sentences, each serving a distinct purpose: what it does, when to use, input format, and output source/coverage. There is no redundant or filler content.

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 read-only tool with one fully described parameter and no output schema, the description covers the essential context: function, trigger phrases, input format, output source, and geographic coverage. No significant gaps remain.

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?

The schema already documents the single parameter 'state' with examples, and the description repeats this format ('Accepts state names or 2-letter codes') without adding new semantics beyond the schema's coverage. Since schema coverage is 100%, the description adds marginal value only.

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 'Get the current average retail diesel price for a US state,' using a specific verb and resource. It distinguishes itself from siblings like opa_get_price or opa_get_futures by explicitly scoping to diesel and state-level.

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?

It provides explicit usage triggers: 'Use when the user asks about diesel prices in a specific state, diesel fuel costs by state, or state-level fuel prices.' This gives clear when-to-use context, though it does not name exclusions or alternative tools.

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