Skip to main content
Glama
hyzhak

Ollama MCP Server

by hyzhak

Push model

push

Upload a local AI model to a registry for sharing or deployment. This tool enables model distribution within the Ollama MCP Server ecosystem.

Instructions

Push a model to a registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • Handler function that calls ollama.push(model: name) and formats the result or error response.
    async ({ name }) => {
      try {
        const result = await ollama.push({ model: name });
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (error) {
        return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true };
      }
    }
  • Input schema defining the 'name' parameter as a string, along with title and description.
    {
      title: "Push model",
      description: "Push a model to a registry",
      inputSchema: { name: z.string() },
    },
  • src/index.ts:101-116 (registration)
    Registers the 'push' tool with the MCP server using server.registerTool.
    server.registerTool(
      "push",
      {
        title: "Push model",
        description: "Push a model to a registry",
        inputSchema: { name: z.string() },
      },
      async ({ name }) => {
        try {
          const result = await ollama.push({ 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. 'Push' implies a write/mutation operation, but it doesn't specify permissions required, whether it's idempotent, rate limits, or what happens on success/failure. This leaves significant gaps for a tool that likely modifies remote state.

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 a single, direct sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core action, making it easy to parse quickly.

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?

Given no annotations, 0% schema coverage, no output schema, and a likely state-changing operation, the description is inadequate. It lacks details on behavior, parameters, outputs, and context needed for reliable use, especially compared to siblings like 'pull'.

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 description coverage is 0%, and the description adds no information about the 'name' parameter beyond what the bare schema indicates. It doesn't explain what the name refers to (e.g., model identifier, file path), expected format, or constraints, failing to compensate for the lack of schema documentation.

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 ('push') and resource ('a model to a registry'), making the purpose understandable. However, it doesn't differentiate this tool from its sibling 'pull' (which likely retrieves models) beyond the directional verb, missing explicit sibling distinction.

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 like 'pull' or 'create'. It lacks context about prerequisites (e.g., needing an existing model), exclusions, or comparisons with sibling tools, offering minimal usage direction.

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