Skip to main content
Glama

ollama_ps

View currently loaded Ollama models to monitor memory usage and manage active instances.

Instructions

List running models. Shows which models are currently loaded in memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNojson

Implementation Reference

  • Core handler logic that invokes ollama.ps() to list running models and formats the output.
    /** * List running models */ export async function listRunningModels( ollama: Ollama, format: ResponseFormat ): Promise<string> { const response = await ollama.ps(); return formatResponse(JSON.stringify(response), format); }
  • src/tools/ps.ts:19-37 (registration)
    Exports the toolDefinition object registering the ollama_ps tool, including its handler function.
    export const toolDefinition: ToolDefinition = { name: 'ollama_ps', description: 'List running models. Shows which models are currently loaded in memory.', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['json', 'markdown'], default: 'json', }, }, }, handler: async (ollama: Ollama, args: Record<string, unknown>, format: ResponseFormat) => { PsInputSchema.parse(args); return listRunningModels(ollama, format); }, };
  • Zod schema used for input validation in the ollama_ps tool handler.
    /** * Schema for ollama_ps tool (list running models) */ export const PsInputSchema = z.object({ format: ResponseFormatSchema.default('json'), });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rawveg/ollama-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server