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.
The mistralai SDK uses an OpenAI-style tool format. Slopshop's OpenAPI schema maps directly to Mistral's Function type — no manual conversion needed.
Install the official Mistral Python SDK. It uses a slightly different client API from openai but the same tool schema structure.
Fetch tool definitions from Slopshop's OpenAPI endpoint and convert to Mistral's ChatCompletionTool format with Function objects.
When Mistral returns finish_reason="tool_calls", POST the function arguments to Slopshop and feed results back as tool messages.
Full agentic loop using the mistralai SDK. Mistral uses the same tool/tool_calls format as OpenAI but accessed through the Mistral client class.
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)
{
"id": "call_xyz",
"type": "function",
"function": {
"name": "whois",
"arguments": "{\"domain\":\"slopshop.gg\"}"
}
}{
"registrar": "Cloudflare",
"created": "2024-01-15",
"expires": "2026-01-15",
"status": "active",
"_engine": "real"
}Mistral's function calling is precise and reliable. Slopshop gives it real tools across 82 categories to call — no dummy stubs, no simulated outputs.
DNS, SSL, HTTP, crypto, hashing, code execution, data transforms, document generation. All real. No hallucinated outputs.
Mistral agents can write to and read from Slopshop's key-value store at zero credit cost. State persists across sessions.
Tool definitions arrive as proper ChatCompletionTool / Function objects. No raw dict manipulation or manual schema work.
Audit logs, per-request tracing, credit usage per tool call. Every invocation logged with inputs, outputs, and latency.
Run the entire Slopshop tool server on your own infrastructure. Zero external dependencies for compute APIs.