Skip to main content
Glama
NightTrek

Ollama MCP Server

by NightTrek

push

Upload a model to a registry for sharing or deployment. Specify the model name to transfer it from local storage to a remote repository.

Instructions

Push a model to a registry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the model to push

Implementation Reference

  • The main handler function for the 'push' tool. It executes the 'ollama push' command with the provided model name and returns the output or throws an error.
    private async handlePush(args: any) {
      try {
        const { stdout, stderr } = await execAsync(`ollama push ${args.name}`);
        return {
          content: [
            {
              type: 'text',
              text: stdout || stderr,
            },
          ],
        };
      } catch (error) {
        throw new McpError(ErrorCode.InternalError, `Failed to push model: ${formatError(error)}`);
      }
    }
  • The tool definition including input schema for the 'push' tool, registered in the ListTools response. Requires a 'name' string parameter.
    {
      name: 'push',
      description: 'Push a model to a registry',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Name of the model to push',
          },
        },
        required: ['name'],
        additionalProperties: false,
      },
  • src/index.ts:266-267 (registration)
    The switch case registration/dispatch in the CallToolRequestHandler that routes 'push' tool calls to the handlePush function.
    case 'push':
      return await this.handlePush(request.params.arguments);
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the action ('push') but doesn't disclose behavioral traits such as whether this is a write operation, what permissions are required, if it overwrites existing models, or any rate limits. The description is minimal and misses key operational details.

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, efficient sentence with no wasted words. It's front-loaded and appropriately sized for the tool's apparent simplicity, 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 the lack of annotations and output schema, and the description's minimalism, it's incomplete. For a tool that likely involves writing to a registry (implied by 'push'), more context is needed on behavior, outcomes, and error handling. The description doesn't compensate for the missing structured data.

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 has 100% description coverage, with the parameter 'name' documented as 'Name of the model to push'. The description doesn't add any meaning beyond this, such as format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter documentation.

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

Purpose3/5

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

The description states the action ('push') and resource ('a model to a registry'), which is clear but vague. It doesn't specify what 'push' entails (e.g., upload, publish) or what 'registry' refers to, and doesn't distinguish it from sibling tools like 'pull' or 'create' beyond the verb difference.

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 is provided on when to use this tool versus alternatives. For example, it doesn't explain when to push versus pull, or how it relates to tools like 'create' or 'run' in the context of model management. The description lacks any context or exclusions.

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/NightTrek/Ollama-mcp'

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