Skip to main content
Glama

OilPriceAPI hosted energy data

Get Latest Price by Code

energy_get_latest
Read-onlyIdempotent

Read the latest price for one exact commodity code from the catalog (find codes with energy_search_catalog). Preserve dataset name, currency, unit and all source/freshness fields; latest is not necessarily spot or settlement. Requires a connected account; access follows the account's plan.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "energy_get_latest"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds behavior the annotations cannot: an account/plan authorization requirement and the semantic caveat that latest may be neither spot nor settlement, plus a directive to preserve source/freshness fields when relaying results. It does not mention rate limits or failure modes on unknown codes.

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 core action and scope come first, followed by the catalog pointer, the return-field caveat, and the auth note — a sensible front-loaded order. Sentences are dense but each one adds a distinct fact; the semicolon-joined clauses make it slightly harder to scan than necessary.

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?

There is no output schema, and the description compensates by naming the fields a caller should expect and preserve (dataset name, currency, unit, source/freshness), which is the most important missing structured information. Authorization is covered, and only the behavior on an unknown or malformed code is left unexplained.

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 single parameter has 0% schema description coverage, so the description must carry the meaning. It does clarify that the code must be exact and should be sourced from the catalog, implying exact-match rather than fuzzy lookup, but it does not restate the format constraints (uppercase alphanumeric plus underscores, 2-64 chars) that sit only in the pattern.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Read the latest price for one exact commodity code from the catalog') and bounds the scope to a single exact code, which separates it from a filtered or bulk lookup. It does not explicitly contrast with the sibling energy_get_price, so the boundary between 'latest' and the general price getter is left partly to inference.

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 gives a concrete precondition path ('find codes with energy_search_catalog') before calling, plus access conditions ('Requires a connected account; access follows the account's plan'). It also warns that 'latest is not necessarily spot or settlement', which tells the caller when this value is and isn't the right one, but it gives no exclusion versus energy_history or energy_get_price.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.