Skip to main content
Glama

API Ninjas (Unofficial)

Commodity Price

commodity_price
Read-onlyIdempotent

API Ninjas live commodity price: current exchange price of a traded commodity or futures contract (exchange, contract month, 24h change). Answers "gold spot price", "silver price today", "lumber price", "live cattle", "heating oil futures", "RBOB gasoline futures". Returns { exchange, name, price, futures_contract, updated }. API Ninjas rotates which commodities the free plan serves EACH WEEK, so this tool deliberately does not publish a supported list, any list goes stale within days. Gold is the dependable one. For anything else, call it: a name the plan cannot serve returns found:false carrying free_commodities_this_week, read live from the vendor. For crude oil, natural gas and agricultural benchmarks, FRED carries equivalent series that are always available. Accepts commodity or symbol as aliases for name. Example: commodity_price({ name: "gold" }).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "gold"
    },
    "name": "commodity_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoCommodity name, e.g. 'gold'. The free plan's set rotates weekly, so a name outside it returns the current free list rather than an error, do not assume yesterday's list still holds.
symbolNoAlias for name.
_apiKeyNoOptional, your own API Ninjas key for higher limits; omit to use the shared Pipeworx key.
commodityNoAlias for name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional — your own API Ninjas key for higher limits; omit to use the shared Pipeworx key."New value: +"Optional, your own API Ninjas key for higher limits; omit to use the shared Pipeworx key."
    • changedInput schema / properties / name / description
      Previous value: -"Commodity name, e.g. 'gold'. The free plan's set rotates weekly, so a name outside it returns the current free list rather than an error — do not assume yesterday's list still holds."New value: +"Commodity name, e.g. 'gold'. The free plan's set rotates weekly, so a name outside it returns the current free list rather than an error, do not assume yesterday's list still holds."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses the non-obvious operational trait that the free plan's commodity set rotates weekly and therefore no supported list is published, plus the exact failure contract (found:false carrying free_commodities_this_week), the API Ninjas key override for higher limits, and which commodity is reliably available. These are behaviors an agent could not infer from annotations or schema.

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?

Purpose and examples are front-loaded and each sentence carries information, but the middle section wanders between the rotation caveat, the fallback contract and the FRED alternative, and the alias sentence repeats the schema.

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?

With no output schema, the description still enumerates the return object's keys and explains the one non-obvious response case (found:false). For a zero-required-parameter lookup tool with fully covered parameter descriptions, nothing an agent needs to call it correctly is missing.

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%, so the naming, aliasing and rotation semantics of name/symbol/commodity/_apiKey are already documented in the schema itself. The description restates the alias fact and one example call, adding only marginal meaning beyond the structured fields.

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 opening sentence names a specific verb and resource (live commodity price / futures contract price) and lists the returned fields (exchange, contract month, 24h change). The example queries ("gold spot price", "live cattle", "RBOB gasoline futures") let an agent match a user intent to this tool without opening the schema.

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?

It states explicitly when to use it (any commodity name, including ones the free plan may not serve - just call it and read found:false), and names a concrete alternative for crude oil, natural gas and agricultural benchmarks (FRED series, always available). That is a real when/when-not/alternative split rather than implied usage.

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.