list_running
List models currently loaded in VRAM with their size, VRAM footprint, and expiry timestamp to determine if Ollama is idle.
Instructions
List models currently loaded into VRAM with their size, VRAM footprint, and expiry timestamp. Empty list means Ollama is idle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:146-157 (handler)The handler function for the 'list_running' tool. Makes a GET request to /api/ps to list models currently loaded in VRAM, returning name, size, VRAM footprint, and expiry timestamp.
async function listRunning() { const r = await httpRequest('GET', '/api/ps'); if (r.error) return errorResult(r.error); const models = (r.data?.models || []).map((m) => ({ name: m.name, size_bytes: m.size, size_vram_bytes: m.size_vram, expires_at: m.expires_at, digest: m.digest, })); return textResult({ count: models.length, models }); } - server.js:288-293 (schema)The tool schema/definition for 'list_running', including its description, annotations, and input schema (empty object, no params needed).
{ name: 'list_running', description: 'List models currently loaded into VRAM with their size, VRAM footprint, and expiry timestamp. Empty list means Ollama is idle.', annotations: { title: 'List running models', readOnlyHint: true, destructiveHint: false, openWorldHint: false }, inputSchema: { type: 'object', properties: {}, additionalProperties: false }, }, - server.js:388-388 (registration)The tool-to-handler mapping registering 'list_running' to the listRunning function.
list_running: listRunning,