FunctionDeclaration  ·  gemini-2.0-flash  ·  google-generativeai  ·  Tool

Slopshop for
Google Gemini Agents

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.

422
Real Tools
0cr
Memory Cost
Tool
Native Format
100%
Verified Results

Quickstart

Three steps. Gemini has tools.

Gemini's function calling uses FunctionDeclaration wrapped in a Tool object. Slopshop's OpenAPI schema maps directly to this format.

Step 01 — Install

Install google-generativeai

Use the official Google AI Python SDK. No extra shims — Slopshop tools convert directly to Gemini's FunctionDeclaration format.

pip install google-generativeai requestsclick to copy
Step 02 — Declare Tools

Build FunctionDeclaration objects

Fetch Slopshop's OpenAPI schema and convert each endpoint to a FunctionDeclaration. Wrap them in a single Tool instance.

Tool(function_declarations=[...]) → Gemini
Step 03 — Handle Calls

Execute via Slopshop, feed back Part

When Gemini returns a function_call Part, POST arguments to Slopshop and return the result as a function_response Part.

82 categories of tools · real execution · verified results

Code Example

Function calling with gemini-2.0-flash

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.

gemini_agent.py python
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)
Gemini function_call Part → Slopshop response
Gemini → function_call Part
{
  "function_call": {
    "name": "ssl-check",
    "args": {
      "host": "slopshop.gg"
    }
  }
}
Slopshop → function_response
{
  "valid": true,
  "expires": "2026-09-12",
  "issuer": "Let's Encrypt",
  "days_left": 170,
  "_engine": "real"
}

What You Get

Everything Gemini needs to act, not just generate

Gemini's multimodal reasoning is exceptional. Slopshop gives it the execution substrate — real tools across 82 categories across every category an agent might need.

🀅

78 Categories of Real Tools

DNS, SSL, HTTP, crypto, hashing, code execution, data transforms, document generation, web research. All real. No hallucinated outputs.

🧠

Free Persistent Memory

Gemini agents can write to and read from Slopshop's key-value store at zero credit cost. State persists across chat sessions automatically.

🔗

FunctionDeclaration-Ready

Slopshop's OpenAPI schema converts directly to Gemini's FunctionDeclaration format. No manual schema translation.

👀

Full Observability

Audit logs, per-request tracing, credit usage per tool call. Every invocation is logged with inputs, outputs, and latency.

🏠

Self-Hostable

Run the entire Slopshop tool server on your own infrastructure. Zero external dependencies for compute APIs. Air-gapped setups supported.


Give Gemini real tools across 82 categories

FunctionDeclaration format. 82 categories of tools. Free memory. Every result verified.
Gemini reasons — Slopshop executes.

Get Started Free OpenAPI Schema Browse Browse All Tools
→ Full Docs → Browse Tools → Agent Templates → Savings Calculator