Skip to main content

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 187K+ 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 187K+ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tcg_oracle_tools-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tcg_oracle_tools-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file tcg_oracle_tools-0.1.0.tar.gz.

File metadata

  • Download URL: tcg_oracle_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for tcg_oracle_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 397e4c4fa494a5d2da1ea5eb5c104edcdc5646fa4540d469f7d5598a290007a4
MD5 f481a732bc125eb20bcaf643871535a0
BLAKE2b-256 a187220d0d64a081f8cf9c5c19eed1d351ed99e2b3c7ff54f3d365adb8571b56

See more details on using hashes here.

File details

Details for the file tcg_oracle_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tcg_oracle_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0074cae6d7c7446d5fd060fb4242cbfd225aa5b18e74d5040c3004bab796999
MD5 492b458518c492f03795b5b6115a2386
BLAKE2b-256 1a09bb9c2a860f827baa5ffa6a59b896094a682f2d7870613629c4981a4180eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page