Skip to content

feat(tools): market history — continuous futures, ICE gasoil, gas storage, macro calendar (#195) - #196

Closed
karlwaldman wants to merge 2 commits into
mainfrom
feat/mcp-history-tools-1110
Closed

karlwaldman wants to merge 2 commits into
mainfrom
feat/mcp-history-tools-1110

Conversation

@karlwaldman

Copy link
Copy Markdown
Member

Summary

Market-history tools for five operations ledger v8 deferred. Each was verified live on 2026-11-10 before the tool was built.

Tool Operation Gate (API contract)
opa_get_continuous_futures_history (new) GET /v1/futures/continuous/brent/historical, /wti/historical futures entitlement; history depth per plan, cap stated in the answer
opa_get_futures_history + contract=gasoil GET /v1/futures/ice-gasoil/historical futures entitlement
opa_get_natural_gas_storage (new) GET /v1/natural-gas/storage Scale plan (403 otherwise)
opa_get_macro_releases (new) GET /v1/macro/releases any key
  • The continuous tool states that the bars are revisable public snapshots, not exchange settlements (metadata.official_settlement=false live). It also states any start-date cap the entitlement applied (metadata.history_window).
  • The macro tool reads meta.calendar.status. It reports "nothing scheduled" only when coverage spans the window and warns on gap or not_loaded.
  • Gas storage: the tool bounds weeks to 1-52 because the API does not bound it. Filed oilpriceapi-api#10762 (unverified): the latest stored week is 2026-10-23 after the 2026-11-05 EIA release.
  • Ledger v9: five rows flipped to exposed. Families futures, natural-gas-fundamentals and macro-calendar are partial. Live-contract catalog entries and two new live-smoke shapes added. README rows added. Tool counts 40 -> 43 (read scope 36 -> 39).

Verification (local, 2026-11-10, rebased on main 124c1de)

  • npm test: all suites pass (see per-PR counts in the commit).
  • npm run build, npm run check:readme-tools, npm run smoke:live-contract-matrix, npm run smoke:package: pass.
  • npm run check:capability-ledger: OK v9 against the live OpenAPI contract (136 operations), rerun after rebasing onto 124c1de (fix(ci): unblock main - npm audit fix (qs), ledger v8 for 18 new API operations, relative test date #193).
  • npm run test:live with the production smoke key (Scale) and SMOKE_WRITE_CONTRACTS=1: every contract PASSED, including the new tools; 0 failed, 0 cannot-check.
  • Plan-gated 403 paths were not observable live: both available test keys are on the same Scale account. They are covered by mocked tests against the documented 403 bodies.

Merge notes

Refs #195.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8

… gas storage, macro calendar (#195)

Exposes five operations ledger v8 deferred, each verified live on
2026-11-10 with the Scale smoke key:

- opa_get_continuous_futures_history: GET /v1/futures/continuous/{brent,wti}/historical.
  Says the bars are revisable public snapshots, not settlements, and
  states any entitlement start-date cap the API applied.
- opa_get_futures_history gains contract=gasoil:
  GET /v1/futures/ice-gasoil/historical (USD per tonne).
- opa_get_natural_gas_storage: GET /v1/natural-gas/storage (Scale plan per
  the API contract; weeks bounded 1-52 by the tool).
- opa_get_macro_releases: GET /v1/macro/releases with the calendar
  coverage caveat, so an empty list is only "nothing scheduled" when
  coverage spans the window.

Ledger v9, live-contract catalog entries, README rows, tool counts 43/39.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 98d37d9e-b845-4059-bcab-080dff0f3942
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The public-claims smoke bans hard-coded plan names in source and packed
surfaces, so plan gates are stated as entitlement gates (HTTP 403).
smoke:docker asserts the container's default read inventory, which still
read 36.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8
@karlwaldman

Copy link
Copy Markdown
Member Author

Superseded by #200.

@karlwaldman
karlwaldman deleted the feat/mcp-history-tools-1110 branch November 10, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:elevated Elevated: auto-merges after an adversarial review APPROVE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant