function_calling  ·  mistral-large  ·  mistral-small  ·  mistralai SDK

Slopshop for
Mistral AI Agents

real tools across 82 categories via Mistral's function calling. Use the mistralai Python SDK — tool definitions in Mistral's native format, execution by Slopshop.
Free persistent memory. Every result verified.

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

Quickstart

Three steps. Mistral has tools.

The mistralai SDK uses an OpenAI-style tool format. Slopshop's OpenAPI schema maps directly to Mistral's Function type — no manual conversion needed.

Step 01 — Install

Install mistralai SDK

Install the official Mistral Python SDK. It uses a slightly different client API from openai but the same tool schema structure.

pip install mistralai requestsclick to copy
Step 02 — Fetch Tools

Pull Slopshop schemas

Fetch tool definitions from Slopshop's OpenAPI endpoint and convert to Mistral's ChatCompletionTool format with Function objects.

GET /v1/openapi.json → ChatCompletionTool[]
Step 03 — Run

Mistral calls, Slopshop executes

When Mistral returns finish_reason="tool_calls", POST the function arguments to Slopshop and feed results back as tool messages.

82 categories of tools · parallel calls · verified results

Code Example

Function calling with mistral-large-latest

Full agentic loop using the mistralai SDK. Mistral uses the same tool/tool_calls format as OpenAI but accessed through the Mistral client class.

mistral_agent.py python
import os, json, requests
from mistralai import Mistral
from mistralai.models import ChatCompletionTool, Function

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])

SLOP_KEY = os.environ["SLOPSHOP_API_KEY"]
SLOP_URL = "https://slopshop.gg"

# 1. Fetch Slopshop tools as Mistral ChatCompletionTool objects
def get_tools(slugs: list[str]) -> list[ChatCompletionTool]:
    schema = requests.get(
        f"{SLOP_URL}/v1/openapi.json",
        headers={"Authorization": f"Bearer {SLOP_KEY}"}
    ).json()
    tools = []
    for slug in slugs:
        path = schema["paths"].get(f"/v1/{slug}", {}).get("post", {})
        if path:
            params = path["requestBody"]["content"]["application/json"]["schema"]
            tools.append(ChatCompletionTool(
                type="function",
                function=Function(
                    name=slug,
                    description=path.get("summary", ""),
                    parameters=params
                )
            ))
    return tools

# 2. Execute a Slopshop tool
def call_tool(name: str, args: dict) -> str:
    res = requests.post(
        f"{SLOP_URL}/v1/{name}",
        json=args,
        headers={"Authorization": f"Bearer {SLOP_KEY}"}
    )
    return json.dumps(res.json())

# 3. Agentic loop — Mistral decides, Slopshop executes
def run_agent(user_message: str) -> str:
    tools = get_tools(["dns-lookup", "ssl-check", "http-request",
                       "whois", "hash", "memory-set", "memory-get"])
    messages = [{"role": "user", "content": user_message}]

    while True:
        response = client.chat.complete(
            model="mistral-large-latest",
            messages=messages,
            tools=tools,
            tool_choice="auto"
        )
        choice = response.choices[0]
        msg = choice.message

        # Mistral signals done with finish_reason "stop"
        if choice.finish_reason == "stop":
            return msg.content

        # Append assistant message with tool_calls
        messages.append({"role": "assistant", "content": msg.content, "tool_calls": msg.tool_calls})

        # Execute tool calls and return results
        for tc in (msg.tool_calls or []):
            result = call_tool(
                tc.function.name,
                json.loads(tc.function.arguments)
            )
            messages.append({
                "role": "tool",
                "tool_call_id": tc.id,
                "content": result,
                "name": tc.function.name
            })

answer = run_agent("Check DNS and SSL for slopshop.gg, then save results to memory")
print(answer)
Mistral tool_calls → Slopshop response
Mistral → tool_calls[]
{
  "id": "call_xyz",
  "type": "function",
  "function": {
    "name": "whois",
    "arguments": "{\"domain\":\"slopshop.gg\"}"
  }
}
Slopshop → tool result
{
  "registrar": "Cloudflare",
  "created": "2024-01-15",
  "expires": "2026-01-15",
  "status": "active",
  "_engine": "real"
}

What You Get

Everything Mistral needs to act, not just complete

Mistral's function calling is precise and reliable. Slopshop gives it real tools across 82 categories to call — no dummy stubs, no simulated outputs.

🀅

78 Categories of Real Tools

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

🧠

Free Persistent Memory

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

🔗

Mistral SDK Format

Tool definitions arrive as proper ChatCompletionTool / Function objects. No raw dict manipulation or manual schema work.

👀

Full Observability

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

🏠

Self-Hostable

Run the entire Slopshop tool server on your own infrastructure. Zero external dependencies for compute APIs.


Give Mistral real tools across 82 categories

mistralai SDK. 82 categories of tools. Free memory. Every result verified.
Mistral plans — Slopshop executes.

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