Skip to main content
Glama
hyzhak
by hyzhak

pull

Retrieve AI models from a registry using the Ollama MCP Server to integrate and manage local language models with full control and privacy.

Instructions

Pull a model from a registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The handler function that performs the model pull using the Ollama client, serializes the result as JSON, and handles errors appropriately.
    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 }; } }
  • Defines the tool schema including title, description, and inputSchema with a required 'name' string validated by Zod.
    { title: "Pull model", description: "Pull a model from a registry", inputSchema: { name: z.string() }, },
  • src/index.ts:83-98 (registration)
    Registers the 'pull' tool with the MCP server using server.registerTool, providing the name, schema, and handler function.
    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 }; } } );

Other Tools

Related Tools

  • @hyzhak/ollama-mcp-server
  • @hyzhak/ollama-mcp-server
  • @bigdata-coss/agent_mcp
  • @hyzhak/ollama-mcp-server
  • @hyzhak/ollama-mcp-server
  • @hyzhak/ollama-mcp-server

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