Snippets

python

Complete, checked snippets in this language.

python

Deterministic capabilities with a strict request contract

A complete Python module that validates model output as data, then runs approved normal code for calculator, email syntax, and mock support-ticket requests.

Compiled with python3 -m py_compile and run with a local self-test in Python 3.14.

python

Host-owned routing for direct and MCP execution

A complete Python unit that maps validated domain intent to approved direct functions or approved MCP tool names.

Compiled with python3 -m py_compile and run with fake MCP results plus mcp 2.0.0 over stdio in Python 3.14.

python

Thin MCP server adapters over deterministic Python tools

A complete MCP server module that exposes approved deterministic capabilities without moving business logic into the MCP layer.

Compiled with python3 -m py_compile and imported with mcp 2.0.0 in Python 3.14, verifying the MCPServer tool registry.

python

Local Ollama intent extractor with schema output

A complete Python unit that asks local Ollama for one JSON intent object, then validates the result before execution can happen.

Compiled with python3 -m py_compile and run with a mocked Ollama response in Python 3.14.