Skip to main content
Glama
hyzhak

Ollama MCP Server

by hyzhak

Copy model

cp

Copy Ollama AI models between locations to duplicate, back up, or transfer models within the local environment.

Instructions

Copy a model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
destinationYes

Implementation Reference

  • Handler function that copies an Ollama model from source to destination using ollama.copy() and returns the result or error.
    async ({ source, destination }) => {
      try {
        const result = await ollama.copy({ source, destination });
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (error) {
        return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true };
      }
    }
  • Input schema for the 'cp' tool, defining required 'source' and 'destination' parameters as strings.
    {
      title: "Copy model",
      description: "Copy a model",
      inputSchema: { source: z.string(), destination: z.string() },
    },
  • src/index.ts:119-134 (registration)
    Registers the 'cp' tool with the MCP server, including schema and inline handler.
    server.registerTool(
      "cp",
      {
        title: "Copy model",
        description: "Copy a model",
        inputSchema: { source: z.string(), destination: z.string() },
      },
      async ({ source, destination }) => {
        try {
          const result = await ollama.copy({ source, destination });
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true };
        }
      }
    );
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Copy a model' implies a mutation/write operation, but the description doesn't disclose any behavioral traits: it doesn't mention whether this requires specific permissions, whether it overwrites existing models at the destination, what happens on failure, or if there are rate limits. This is inadequate for a tool that presumably modifies data.

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 three words ('Copy a model'), with zero wasted text. It's front-loaded with the core action, though this brevity comes at the cost of completeness. Every word earns its place by stating the basic operation.

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

Completeness1/5

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

Given the complexity of a copy operation (likely involving data mutation), no annotations, no output schema, and 2 undocumented parameters, the description is completely inadequate. It doesn't explain what 'model' means in this context, how the copy behaves, what gets returned, or any error conditions. This leaves critical gaps for an AI agent to use the tool correctly.

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

Parameters1/5

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

The input schema has 2 parameters (source, destination) with 0% description coverage in the schema itself. The tool description 'Copy a model' adds no meaning about what these parameters represent—it doesn't explain that 'source' is the model to copy from and 'destination' is where to copy it to, nor does it provide format examples (e.g., model IDs, paths). With low schema coverage, the description fails to compensate.

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

Purpose2/5

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

The description 'Copy a model' is a tautology that essentially restates the tool name 'cp' (copy) and title 'Copy model'. It specifies the verb 'copy' and resource 'model', but provides no differentiation from sibling tools like 'create', 'push', or 'pull' which might also involve model manipulation. The purpose is clear at a basic level but lacks specificity about what kind of copying this performs.

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 'create' (for new models), 'push' (for uploading), and 'pull' (for downloading), there's no indication whether 'cp' is for local duplication, cross-workspace copying, or version control operations. No prerequisites, exclusions, or contextual recommendations are mentioned.

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