Skip to main content
Glama
hyzhak

Ollama MCP Server

by hyzhak

Pull model

pull

Download AI models from registries to your local machine for offline use with Ollama's local LLM capabilities.

Instructions

Pull a model from a registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The handler function that executes the 'pull' tool logic: pulls the specified model using ollama.pull({ model: name }) and formats the result or error response.
    async ({ name }) => {
      try {
        const result = await ollama.pull({ model: name });
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (error) {
        return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true };
      }
    }
  • Zod input schema for the 'pull' tool requiring a 'name' parameter of type string.
    inputSchema: { name: z.string() },
  • src/index.ts:83-98 (registration)
    Registration of the 'pull' tool using server.registerTool, including schema and handler.
    server.registerTool(
      "pull",
      {
        title: "Pull model",
        description: "Pull a model from a registry",
        inputSchema: { name: z.string() },
      },
      async ({ name }) => {
        try {
          const result = await ollama.pull({ model: name });
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Pull a model from a registry' implies a read operation that retrieves content, but doesn't specify whether this downloads files, caches locally, requires authentication, has rate limits, or what happens on success/failure. The description is minimal and lacks important behavioral context.

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 extremely concise at just 6 words, with zero wasted language. It's front-loaded with the core action and resource, making it immediately understandable at a basic level.

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

Completeness2/5

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

For a tool with no annotations, no output schema, and 0% schema description coverage, the description is insufficiently complete. It doesn't explain what 'pulling' entails operationally, what the parameter means, what happens after execution, or how this differs from related registry operations among the sibling tools.

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?

The schema has 0% description coverage for its single parameter 'name', and the tool description provides no information about what this parameter represents. The description doesn't clarify whether 'name' refers to a model identifier, registry path, version tag, or other specification needed to pull the correct model.

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

Purpose4/5

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

The description clearly states the action ('pull') and resource ('model from a registry'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from its sibling 'push', which would be the logical counterpart for registry operations.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'push', 'list', 'show', and 'rm' that likely operate on the same registry/models, there's no indication of when pulling is appropriate versus other operations.

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/hyzhak/ollama-mcp-server'

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