Skip to main content
Glama

ollama_list

Display installed Ollama models with details like name, size, and modification date in your preferred format.

Instructions

List all available Ollama models installed locally. Returns model names, sizes, and modification dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (default: json)json

Implementation Reference

  • Core handler function that invokes ollama.list() to retrieve available models and formats the response.
    export async function listModels( ollama: Ollama, format: ResponseFormat ): Promise<string> { const response = await ollama.list(); return formatResponse(JSON.stringify(response), format); }
  • Tool registration definition exporting name 'ollama_list', description, input schema, and handler function for autoloading.
    export const toolDefinition: ToolDefinition = { name: 'ollama_list', description: 'List all available Ollama models installed locally. Returns model names, sizes, and modification dates.', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['json', 'markdown'], description: 'Output format (default: json)', default: 'json', }, }, }, handler: async (ollama: Ollama, args: Record<string, unknown>, format: ResponseFormat) => { return listModels(ollama, format); }, };
  • Input schema definition for the ollama_list tool, specifying optional format parameter.
    inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['json', 'markdown'], description: 'Output format (default: json)', 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