Skip to main content
Glama
OilpriceAPI

OilPriceAPI

Official

Create Price Subscription

opa_create_price_subscription

Create ongoing price watches for commodities. Snapshots at chosen intervals, logging changes for later retrieval.

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
nameNoOptional human-readable label for the watch (e.g., 'Crude desk hourly').
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.
Behavior5/5

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

Discloses writing to user account (mutating), polling nature, per-tier limits, and that events are recorded every interval. Annotations already indicate non-readonly, but description adds valuable behavioral details beyond annotations.

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?

Description is long but well-structured with front-loaded key info, examples, and distinctions. Every sentence adds value; could be slightly tighter but still effective.

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?

Comprehensive coverage of prerequisites (API key), behavior, limits, polling vs pushing, and related tools. Missing output schema but explains events can be polled later, making it complete for this tool's complexity.

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

Parameters4/5

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

Schema covers 100% of parameters, but description adds examples ('5m', '1h', 'daily'), explains free tier limitations, and clarifies codes are commodity names. Adds value beyond schema descriptions.

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?

Clearly states it creates a persistent recurring price subscription (watch) tied to the user's account. Distinguishes from price alerts and mentions ongoing monitoring of commodities.

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?

Explicitly says when to use (ongoing monitoring) and contrasts with alerts (always emits events vs threshold). Names alternative tools (opa_list_subscriptions, opa_delete_subscription) and provides context like API key requirement and 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