LangChain-compatible tools for TCG card grading, Monte Carlo pricing, and market search. Powered by The Undesirables TCG Oracle API.
Project description
🔮 TCG Oracle Tools
LangChain, CrewAI & OpenAI-compatible tools for trading card game intelligence.
Drop TCG search, market data, AI grading, and Monte Carlo price simulation into any AI agent in under 60 seconds.
Install
pip install tcg-oracle-tools
With LangChain support:
pip install tcg-oracle-tools[langchain]
Quick Start (Standalone)
from tcg_oracle import TCGOracleClient
client = TCGOracleClient()
# Search 370K+ products
results = client.search("Charizard", limit=5)
for card in results.results:
print(f"{card.name}: ${card.market_price}")
# Market snapshot
market = client.market("Pokemon")
print(f"Tracking {market.total_products} products")
LangChain Agent
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
from tcg_oracle.langchain import TCGSearchTool, TCGMarketTool
tools = [TCGSearchTool(), TCGMarketTool()]
agent = initialize_agent(tools, ChatOpenAI(), agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)
agent.run("What's the most expensive Pokemon card right now?")
OpenAI Function Calling
import openai
from tcg_oracle.openai_spec import tools, handle_tool_call
response = openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Find me Pikachu cards under $50"}],
tools=tools(),
)
if response.choices[0].message.tool_calls:
result = handle_tool_call(response.choices[0].message.tool_calls[0])
print(result)
CrewAI
from crewai_tools import tool
from tcg_oracle import TCGOracleClient
client = TCGOracleClient()
@tool("Search TCG Products")
def search_tcg(query: str) -> str:
"""Search trading card products by name and get market prices."""
result = client.search(query)
return str([{"name": c.name, "price": c.market_price} for c in result.results])
AutoGPT Plugin
Point AutoGPT at the OpenAPI spec:
https://methods-supplier-foundation-stuck.trycloudflare.com/openapi.json
API Endpoints
| Endpoint | Price | Description |
|---|---|---|
/api/v1/search |
FREE | Search 370K+ TCG products |
/api/v1/market |
FREE | Daily market snapshot |
/api/v1/grade |
$0.05 USDC | AI card grading (PSA/Beckett) |
/api/v1/simulate |
$0.10 USDC | Monte Carlo price simulation |
Agent-to-Agent (Virtuals ACP v2)
TCG Oracle is registered on Virtuals ACP. Autonomous agents can discover, hire, and pay for services using USDC on Base.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tcg_oracle_tools-0.2.0.tar.gz.
File metadata
- Download URL: tcg_oracle_tools-0.2.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e8f41e4357d34a6afb980381454fe260192fb7aad74a20ad95ed6589cc68958
|
|
| MD5 |
1fcf8870b74ab1dbb7a616afe640ba5b
|
|
| BLAKE2b-256 |
c578ac684792af834b2fc47462c33ee8a00069d9a165a8f935426536a13d2ef6
|
File details
Details for the file tcg_oracle_tools-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tcg_oracle_tools-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1eba6c32a62f92f32d6e8931d965d40fe3ea7a813eea9b968e7b8dd7df5a593
|
|
| MD5 |
43d0bb1ae6126877aa26f4c232ce7272
|
|
| BLAKE2b-256 |
c7a333258b308f4256cc688065f4fe74266c2e90033c1ce539b57a3a25701099
|