function_calling  ·  tool_choice  ·  /v1/openapi.json  ·  Python SDK

Slopshop for
GPT & OpenAI Agents

One API key. 82 categories of tools. Real compute, not hallucinated functions.
Auto-generate function definitions from /v1/openapi.json and drop them straight into your tools array.

82
Functions
JSON
Schema Native
0cr
Memory Cost
100%
Real Results

Quickstart

Three steps. GPT has real functions.

The fastest path: fetch our OpenAPI spec, convert to OpenAI function definitions, pass to client.chat.completions.create(). Done.

Step 01 — Install

pip install openai slopshop

Install the OpenAI Python SDK and Slopshop client. Or just use requests — Slopshop is a plain REST API.

pip install openai slopshop
Step 02 — Auto-generate

Convert OpenAPI → function definitions

Hit /v1/openapi.json to get the full spec. Our helper converts it to OpenAI's tools format in one call.

GET slopshop.gg/v1/openapi.json
Step 03 — Execute

Pass tools[], handle tool_calls

GPT returns tool_calls, you POST to Slopshop, return the result as a tool message. Loop until done.

tool_calls → POST /v1/{tool} → tool result

OpenAPI → Function Definitions

Auto-generate from /v1/openapi.json

Don't write function definitions by hand. Slopshop publishes a full OpenAPI 3.0 spec. One helper converts every tool into an OpenAI-compatible function definition, complete with JSON Schema parameter types.

convert_tools.py — OpenAPI → OpenAI functions python
# Convert Slopshop's OpenAPI spec into OpenAI function definitions
# Every tool becomes a callable function GPT can invoke

import requests

def get_slopshop_tools(api_key: str, slugs: list[str] = None) -> list[dict]:
    """Fetch Slopshop tools as OpenAI function definitions."""
    url = "https://slopshop.gg/v1/openapi.json"
    headers = {"Authorization": f"Bearer {api_key}"}

    spec = requests.get(url, headers=headers).json()
    tools = []

    for path, methods in spec["paths"].items():
        for method, op in methods.items():
            if method != "post": continue
            slug = path.lstrip("/v1/")

            if slugs and slug not in slugs: continue

            # Extract parameter schema from requestBody
            schema = (op
                .get("requestBody", {})
                .get("content", {})
                .get("application/json", {})
                .get("schema", {"type": "object", "properties": {}})
            )

            tools.append({
                "type": "function",
                "function": {
                    "name": slug.replace("-", "_"),
                    "description": op.get("summary", op.get("description", "")),
                    "parameters": schema,
                    "strict": True
                }
            })

    return tools

Working Code Example

GPT + Slopshop: full function_calling loop

Copy-paste this. GPT calls the functions, you route to Slopshop, return results, loop. No custom tool implementations. No hallucinated outputs.

gpt_agent.py — complete function_calling loop python
import os, json, requests
from openai import OpenAI

client = OpenAI()
SLOP_KEY = os.environ["SLOPSHOP_API_KEY"]
SLOP_URL = "https://slopshop.gg"


def call_slopshop(tool_name: str, arguments: dict) -> str:
    """Execute a Slopshop tool and return the result as a string."""
    slug = tool_name.replace("_", "-")  # GPT uses underscores, Slopshop uses hyphens
    resp = requests.post(
        f"{SLOP_URL}/v1/{slug}",
        headers={
            "Authorization": f"Bearer {SLOP_KEY}",
            "Content-Type": "application/json"
        },
        json=arguments
    )
    result = resp.json()

    # _engine: "real" = actual compute, not a language model guess
    assert result.get("_engine") == "real", "Expected real compute"
    return json.dumps(result)


def run_agent(user_message: str, model: str = "gpt-4o") -> str:
    """Run a GPT agent with Slopshop tools until completion."""
    tools = get_slopshop_tools(SLOP_KEY, slugs=[
        "dns_lookup", "ssl_check", "http_request",
        "whois", "hash", "url_parse",
        "memory_set", "memory_get"
    ])

    messages = [{"role": "user", "content": user_message}]

    while True:
        response = client.chat.completions.create(
            model=model,
            messages=messages,
            tools=tools,
            tool_choice="auto"
        )
        msg = response.choices[0].message
        messages.append(msg)

        if msg.tool_calls:
            for tc in msg.tool_calls:
                result = call_slopshop(
                    tc.function.name,
                    json.loads(tc.function.arguments)
                )
                messages.append({
                    "role": "tool",
                    "tool_call_id": tc.id,
                    "content": result
                })
        else:
            return msg.content


# Run it
answer = run_agent(
    "Check the SSL cert for slopshop.gg, get its DNS records, and save a summary to memory"
)
print(answer)
What GPT sends / what Slopshop returns
GPT → tool_calls[0]
{
  "id": "call_abc123",
  "type": "function",
  "function": {
    "name": "dns_lookup",
    "arguments": "{\"host\":\"slopshop.gg\"}"
  }
}
Slopshop → tool result
{
  "A": ["34.120.177.34"],
  "MX": ["mail.slopshop.gg"],
  "NS": ["ns1.cloudflare.com"],
  "TTL": 300,
  "_engine": "real"
}

Note: GPT uses underscores in function names (dns_lookup), Slopshop uses hyphens in slugs (dns-lookup). The call_slopshop() helper above handles this automatically.


What You Get

tools across 82 categories GPT can actually call

Stop writing tool implementations. Every category GPT might reach for — already built, production-tested, and verified real.

78 Categories of Real Tools

DNS, SSL, HTTP, crypto, hashing, code execution, data transforms, web research, document generation. All backed by real compute.

📈

OpenAPI 3.0 Spec

Full /v1/openapi.json with JSON Schema for every parameter. Auto-generate function definitions in seconds.

🧠

Free Persistent Memory

GPT can write and read from Slopshop's memory store between calls. Zero credit cost. State persists across sessions.

👀

Full Observability

Audit logs, per-call tracing, credit usage. Every function call GPT makes is logged with inputs, outputs, and latency.

🏠

Self-Hostable

Run the Slopshop server yourself. Zero external dependencies for compute APIs. Works in air-gapped environments.


Give GPT real tools across 82 categories

One API key. Auto-generated function definitions. Real compute, not hallucinated functions.
GPT stops pretending to execute — it actually executes.

Read the Docs Download openapi.json Browse Browse All Tools
→ Full Docs → Browse Tools → Agent Templates → Savings Calculator