real tools across 82 categories via Gemini's function calling. Define tools as FunctionDeclaration objects, pass them in a Tool wrapper, and Slopshop handles execution.
Free persistent memory. Every result verified.
Gemini's function calling uses FunctionDeclaration wrapped in a Tool object. Slopshop's OpenAPI schema maps directly to this format.
Use the official Google AI Python SDK. No extra shims — Slopshop tools convert directly to Gemini's FunctionDeclaration format.
Fetch Slopshop's OpenAPI schema and convert each endpoint to a FunctionDeclaration. Wrap them in a single Tool instance.
When Gemini returns a function_call Part, POST arguments to Slopshop and return the result as a function_response Part.
Full agentic loop using the google-generativeai SDK. Handles Gemini's function_call / function_response Part cycle until the model returns a text Part with no more tool calls.
import os, json, requests import google.generativeai as genai from google.generativeai.types import FunctionDeclaration, Tool, content_types genai.configure(api_key=os.environ["GOOGLE_API_KEY"]) SLOP_KEY = os.environ["SLOPSHOP_API_KEY"] SLOP_URL = "https://slopshop.gg" # 1. Build FunctionDeclaration objects from Slopshop's OpenAPI schema def build_tools(slugs: list[str]) -> Tool: schema = requests.get( f"{SLOP_URL}/v1/openapi.json", headers={"Authorization": f"Bearer {SLOP_KEY}"} ).json() declarations = [] for slug in slugs: path = schema["paths"].get(f"/v1/{slug}", {}).get("post", {}) if path: params = path["requestBody"]["content"]["application/json"]["schema"] declarations.append(FunctionDeclaration( name=slug, description=path.get("summary", ""), parameters=params )) return Tool(function_declarations=declarations) # 2. Execute a Slopshop tool def call_tool(name: str, args: dict) -> dict: res = requests.post( f"{SLOP_URL}/v1/{name}", json=args, headers={"Authorization": f"Bearer {SLOP_KEY}"} ) return res.json() # 3. Agentic loop — Gemini calls, Slopshop executes def run_agent(user_message: str) -> str: tool = build_tools(["dns-lookup", "ssl-check", "http-request", "whois", "hash", "memory-set", "memory-get"]) model = genai.GenerativeModel( model_name="gemini-2.0-flash", tools=[tool] ) chat = model.start_chat(enable_automatic_function_calling=False) # Send user message response = chat.send_message(user_message) while True: # Collect all function_call Parts from this response fn_calls = [ part.function_call for candidate in response.candidates for part in candidate.content.parts if part.function_call.name ] if not fn_calls: # No more tool calls — extract text return response.text # Execute each tool call and build function_response Parts fn_responses = [] for fc in fn_calls: result = call_tool(fc.name, dict(fc.args)) fn_responses.append( content_types.to_part({ "function_response": { "name": fc.name, "response": result } }) ) response = chat.send_message(fn_responses) # Run it answer = run_agent("Audit slopshop.gg: check DNS, SSL cert validity, and HTTP response headers") print(answer)
{
"function_call": {
"name": "ssl-check",
"args": {
"host": "slopshop.gg"
}
}
}{
"valid": true,
"expires": "2026-09-12",
"issuer": "Let's Encrypt",
"days_left": 170,
"_engine": "real"
}Gemini's multimodal reasoning is exceptional. Slopshop gives it the execution substrate — real tools across 82 categories across every category an agent might need.
DNS, SSL, HTTP, crypto, hashing, code execution, data transforms, document generation, web research. All real. No hallucinated outputs.
Gemini agents can write to and read from Slopshop's key-value store at zero credit cost. State persists across chat sessions automatically.
Slopshop's OpenAPI schema converts directly to Gemini's FunctionDeclaration format. No manual schema translation.
Audit logs, per-request tracing, credit usage per tool call. Every invocation is logged with inputs, outputs, and latency.
Run the entire Slopshop tool server on your own infrastructure. Zero external dependencies for compute APIs. Air-gapped setups supported.