Skip to Content
OchreML
MCP Tools

ochreml_device_info

Probe host CPU, RAM, CUDA/Multi-GPU, wgpu, TPU PJRT hardware capabilities, and optional Python packages.

ochreml_device_info inspects the host machine and reports available OchreML hardware accelerators, system memory, CPU core count, and detected optional packages (numpy, pyarrow, polars, pandas).

It is backed by ochreml._ops.op_device_info() and requires no filesystem access.

Input Schema

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

This tool takes no arguments. Passing unknown properties violates additionalProperties: false.

Example JSON-RPC Call

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "ochreml_device_info",
    "arguments": {}
  }
}

Response Fields

The JSON object inside result.content[0].text contains:

FieldTypeDescription
versionstringInstalled OchreML package version.
python_versionstringActive Python runtime version (platform.python_version()).
platformstringHost OS and architecture string (platform.platform()).
cpu_countinteger | nullLogical CPU count (os.cpu_count()).
ram_total_mbnumber | nullTotal host RAM in MB (read from /proc/meminfo or os.sysconf).
ram_available_mbnumber | nullAvailable host RAM in MB (Linux /proc/meminfo, null on platforms without MemAvailable).
default_devicestringCurrent default OchreML device (defaults to "auto").
available_devicesstring[]Discovered devices, e.g. ["cpu", "cuda:0", "wgpu"].
hardwareobjectDetailed backend capability strings from ochreml.get_device_info().
optional_packagesobjectAvailability booleans for numpy, pyarrow, polars, and pandas.

Example Response Payload

{
  "version": "0.3.7a1",
  "python_version": "3.12.7",
  "platform": "Linux-6.8.0-x86_64",
  "cpu_count": 8,
  "ram_total_mb": 32768.0,
  "ram_available_mb": 24110.5,
  "default_device": "auto",
  "available_devices": ["cpu", "cuda:0"],
  "hardware": {
    "cpu": "8 threads (Rayon)",
    "cuda": "NVIDIA GeForce RTX 4090"
  },
  "optional_packages": {
    "numpy": true,
    "pyarrow": false,
    "polars": false,
    "pandas": false
  }
}

On this page