Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official
by OilpriceAPI

opa_create_price_subscription

Create recurring price subscriptions that snapshot commodity prices at defined intervals and record events for later review.

Instructions

Create a PERSISTENT, recurring price subscription (a 'watch') tied to the user's OilPriceAPI account. The API snapshots the watched commodities every interval and records an event each time — so the agent can come back later and poll for what changed via opa_get_subscription_events. Use when the user wants ONGOING monitoring of one or more commodities (e.g. 'keep watching Brent and WTI every hour'). This is different from a price alert: a watch ALWAYS emits an event every interval (a running log), whereas an alert only fires when a threshold is crossed. REQUIRES an API key (OILPRICEAPI_KEY) — this writes to the user's account. Events are POLLED, not pushed: there is no always-on connection. Manage watches with opa_list_subscriptions and opa_delete_subscription. Per-tier limits apply (free: 1 watch, 3 codes, 1h minimum interval); the API returns the exact limit if exceeded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codesYesCommodity names or codes to watch (e.g., ['brent', 'wti'] or ['BRENT_CRUDE_USD']). Free tier allows up to 3 codes per watch.
intervalYesHow often to snapshot: a friendly interval like '5m', '1h', '6h', 'daily', or a bare number of seconds ('3600'). The minimum allowed interval depends on the plan (free: 1h). If below the floor the API returns the exact minimum.
nameNoOptional human-readable label for the watch (e.g., 'Crude desk hourly').
Behavior5/5

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

No annotations provided, so the description fully discloses behavioral traits: persistent, recurring, polled events, writes to user's account, requires API key, per-tier limits, and behavior when limits exceeded. No contradictions.

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 a single paragraph but well-structured, front-loading the core purpose, then covering behavior, usage, and limitations. Every sentence adds value; no redundancy.

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?

Given 3 parameters, no output schema, no annotations, the description fully covers what the tool does, how to use it, prerequisites, differences from alerts, and error handling (limits). It is complete for an AI agent to invoke correctly.

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

Parameters5/5

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

Schema coverage is 100%, and the description adds additional context: examples for codes (friendly names or codes), interval format details ('5m', '1h', etc.), and minimum interval constraints. It also explains the optional name 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?

The description clearly states the tool creates a persistent recurring price subscription (a 'watch'), distinguishes it from price alerts (watch always emits events vs. alert on threshold), and lists related management tools. The verb 'Create' and resource 'price subscription' are explicit.

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?

The description explicitly states when to use (ongoing monitoring), contrasts with alerts, notes the requirement for an API key, explains polling vs. push, and references sibling tools for management. It also mentions per-tier limits.

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