Skip to main content
Glama

pull_model

Download a model from the Ollama registry for local use. Blocks until complete.

Instructions

Download a model from the Ollama registry. Blocks until complete — can take a long time for multi-GB models. For very large pulls, prefer ollama pull in a terminal where you can watch progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesModel name to pull (e.g. "llama3.1:8b").

Implementation Reference

  • The `pullModel` function is the handler for the `pull_model` tool. It validates the required 'name' argument, sends an HTTP POST request to Ollama's /api/pull endpoint with stream:false, and returns the model name, status, and success flag.
    async function pullModel(args) {
      const bad = requireString(args, 'name');
      if (bad) return errorResult(bad);
      // Use stream:false — Ollama buffers and returns a single final event.
      // For very large models this can block the connection for a long time;
      // users pulling multi-GB models are better served by `ollama pull` in a
      // terminal where they can see progress. Documented in the README.
      const r = await httpRequest('POST', '/api/pull', { name: args.name, stream: false });
      if (r.error) return errorResult(r.error);
      const d = r.data || {};
      return textResult({
        name: args.name,
        status: d.status || 'unknown',
        success: d.status === 'success',
      });
    }
  • Tool definition/schema for 'pull_model'. Includes name, description, annotations (title: 'Pull model'), and inputSchema requiring a 'name' string (e.g. 'llama3.1:8b').
    {
      name: 'pull_model',
      description: 'Download a model from the Ollama registry. Blocks until complete — can take a long time for multi-GB models. For very large pulls, prefer `ollama pull` in a terminal where you can watch progress.',
      annotations: { title: 'Pull model', readOnlyHint: false, destructiveHint: false, openWorldHint: true },
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Model name to pull (e.g. "llama3.1:8b").' },
        },
        required: ['name'],
        additionalProperties: false,
      },
  • server.js:384-394 (registration)
    The HANDLERS map at line 392 registers 'pull_model' to the pullModel function, which is looked up during tools/call dispatch in the handle() function.
    const HANDLERS = {
      ollama_status: ollamaStatus,
      list_models: listModels,
      list_running: listRunning,
      show_model: showModel,
      generate: generate,
      chat: chat,
      pull_model: pullModel,
      delete_model: deleteModel,
    };
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the tool blocks until completion and can take a long time, which are important behavioral traits not captured by annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true). It does not elaborate on authentication or error handling, but the blocking behavior is a key disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the primary action, and every sentence adds value. No redundant or irrelevant information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single parameter and no output schema, the description adequately covers purpose, behavioral aspects, and usage advice. It could mention success indicators or behavior on existing models, but the current level is sufficient for a simple pull operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides full coverage (100%) with a description for the 'name' parameter including an example. The tool description does not add additional meaning beyond what the schema already conveys, hence a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool downloads a model from the Ollama registry, with a specific verb ('Download') and resource ('model from the Ollama registry'). It distinguishes itself from sibling tools like 'delete_model' and 'generate' by focusing solely on pulling models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises preferring the terminal `ollama pull` for very large models, giving explicit guidance on when to avoid this tool. However, it does not compare against other server tools (e.g., not to use if model is already present), but the external alternative is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/LukeLamb/claude-ollama-mcp'

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