Skip to main content
Glama

ollama_pull

Download models from the Ollama registry to make them available locally for use with MCP-compatible applications.

Instructions

Pull a model from the Ollama registry. Downloads the model to make it available locally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesName of the model to pull
insecureNoAllow insecure connections
formatNojson

Implementation Reference

  • Core handler function that performs the ollama.pull operation to download the specified model.
    /** * Pull a model from the Ollama registry */ export async function pullModel( ollama: Ollama, model: string, insecure: boolean, format: ResponseFormat ): Promise<string> { const response = await ollama.pull({ model, insecure, stream: false, }); return formatResponse(JSON.stringify(response), format); }
  • Zod schema used for input validation in the ollama_pull tool handler.
    /** * Schema for ollama_pull tool */ export const PullModelInputSchema = z.object({ model: z.string().min(1), insecure: z.boolean().default(false), format: ResponseFormatSchema.default('json'), });
  • Tool definition export that registers the 'ollama_pull' tool, including its description, inline input schema, and handler wrapper that performs validation and delegates to the core pullModel function. Auto-loaded by src/autoloader.ts.
    export const toolDefinition: ToolDefinition = { name: 'ollama_pull', description: 'Pull a model from the Ollama registry. Downloads the model to make it available locally.', inputSchema: { type: 'object', properties: { model: { type: 'string', description: 'Name of the model to pull', }, insecure: { type: 'boolean', description: 'Allow insecure connections', default: false, }, format: { type: 'string', enum: ['json', 'markdown'], default: 'json', }, }, required: ['model'], }, handler: async (ollama: Ollama, args: Record<string, unknown>, format: ResponseFormat) => { const validated = PullModelInputSchema.parse(args); return pullModel(ollama, validated.model, validated.insecure, format); }, };

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