Skip to main content
Glama

pull_model

Download or update an Ollama model from the registry, with streaming status updates on download progress.

Instructions

Download / update an Ollama model from the Ollama registry. Returns streaming status lines summarising the download progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'pull_model' tool via @mcp.tool decorator and the async handler function that calls oc.pull_model and returns status lines.
    @mcp.tool(
        name="pull_model",
        description=(
            "Download / update an Ollama model from the Ollama registry. "
            "Returns streaming status lines summarising the download progress."
        ),
    )
    async def pull_model(model_name: str) -> dict[str, Any]:
        """
        Args:
            model_name: The name of the model to pull (e.g. 'llama3', 'phi3').
        """
        lines = await oc.pull_model(model_name)
        return {"model": model_name, "status_lines": lines[-10:], "total_lines": len(lines)}
  • The underlying Ollama API client function that streams POST /api/pull to download/update a model, returning a list of status lines.
    async def pull_model(name: str) -> list[str]:
        """Pull a model, streaming status lines."""
        lines: list[str] = []
        async with _client(timeout=600) as c:
            async with c.stream("POST", "/api/pull", json={"name": name, "stream": True}) as resp:
                resp.raise_for_status()
                async for raw in resp.aiter_lines():
                    if raw.strip():
                        lines.append(raw)
        return lines
  • Input schema: takes a 'model_name' string parameter. Output schema: returns a dict with 'model', 'status_lines' (last 10 lines), and 'total_lines'.
    async def pull_model(model_name: str) -> dict[str, Any]:
        """
        Args:
            model_name: The name of the model to pull (e.g. 'llama3', 'phi3').
        """
        lines = await oc.pull_model(model_name)
        return {"model": model_name, "status_lines": lines[-10:], "total_lines": len(lines)}
Behavior3/5

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

Discloses streaming status lines for progress, but no annotations exist. Lacks details on side effects (e.g., overwriting existing models), permissions, or error scenarios.

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?

Two sentences, no fluff, front-loaded purpose. Highly concise.

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?

Simple tool with one parameter; description explains return format as streaming status lines. Could mention output schema details but adequate for basic usage.

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

Parameters2/5

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

Schema coverage 0% and description only implicitly refers to model_name via 'Ollama model'. No details on naming format, required patterns, or defaults.

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?

Explicit verb 'Download / update' and specific resource 'Ollama model from the Ollama registry' clearly distinguishes from sibling tools like delete_model or list_models.

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

Usage Guidelines2/5

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

No guidance on when to download vs update, or when to prefer this over other model management tools. Only implicit usage through the verb 'download/update'.

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/deadSwank001/Nexus-MCP'

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