Skip to main content
Glama

delete_model

Delete a locally stored Ollama model to free disk space. Remove unnecessary models from your environment to manage storage effectively.

Instructions

Delete a locally stored Ollama model to free disk space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function that executes the delete_model logic. It accepts a model_name string and delegates to the Ollama client's delete_model method.
    async def delete_model(model_name: str) -> dict[str, Any]:
        """
        Args:
            model_name: The exact name of the model to delete.
        """
        return await oc.delete_model(model_name)
  • The tool registration decorator that registers 'delete_model' with the FastMCP server, including a description for the tool.
    @mcp.tool(
        name="delete_model",
        description="Delete a locally stored Ollama model to free disk space.",
    )
  • The underlying Ollama API client function that performs the actual HTTP DELETE request to '/api/delete' on the Ollama server.
    async def delete_model(name: str) -> dict[str, Any]:
        async with _client() as c:
            r = await c.request("DELETE", "/api/delete", json={"name": name})
            r.raise_for_status()
            return {"deleted": name, "status": "ok"}
Behavior2/5

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

No annotations provided. Description only states the obvious destructive action ('delete'), but lacks additional behavioral context such as irreversibility, side effects on running processes, or disk space recovery details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no wasted words, but could be expanded for better informativeness without losing conciseness.

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 tool's simplicity and existence of output schema, the description is too minimal. It omits critical context such as error states, preconditions, and relationship to other model management tools.

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?

Schema has one parameter 'model_name' with no description (0% coverage). The description does not add any meaning beyond 'model name', failing to specify format, list of valid names, or how to obtain it.

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

Purpose5/5

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

Description clearly states the verb 'Delete', the resource 'locally stored Ollama model', and the purpose 'to free disk space'. It distinguishes from sibling tools like list_models or pull_model.

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 on when to use or not use this tool. No mention of prerequisites like model being stopped or not in use, nor alternatives for partial deletion.

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/deadSwank001/Nexus-MCP'

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