Skip to main content
Glama

remove_model

Remove a local AI model from Ollama with a safe dry-run option to preview deletion. Enables undo recording for reversible removals.

Instructions

[WRITE][risk=high] Delete a local model. Destructive — pass dry_run=True to preview.

Captures the model's manifest so the harness records an undo (re-pull).

An undo is recorded only when the allow/deny policy would permit re-pulling the model. For a denied one the result says reversible=false and explains why, rather than recording a re-pull that undo_apply is bound to refuse. The dry-run preview carries the same verdict, so the caller learns it before the deletion rather than after.

Args: model: Model name to delete. dry_run: If True, return what WOULD be deleted without deleting. target: Ollama target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
targetNo
dry_runNo
Behavior5/5

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

Given no annotations, the description fully discloses destructive nature, dry-run behavior, undo recording conditions (only if policy permits re-pull), and that dry_run carries the same verdict. This is comprehensive.

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?

Well-structured with a clear opening, behavioral context, then parameter definitions. Every sentence adds value; not overly verbose for the complexity exposed.

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

Completeness3/5

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

Lacks explanation of the normal (non-dry-run) return value or output schema. Since no output schema exists, the description should clarify what the user receives upon deletion (e.g., success message or model details). Otherwise, coverage is solid.

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

Parameters5/5

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

Despite 0% schema description coverage, the Args section in the description defines each parameter: model as required name, dry_run as boolean for preview, target as optional default host. Fully compensates for missing schema descriptions.

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 'Delete a local model', distinguishing it from siblings like list_models (read-only), pull_model (download), and unload_model (unload from memory). The [WRITE][risk=high] prefix reinforces the purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance to use dry_run=True for previewing, and explains the undo recording behavior and policy implications. While it doesn't contrast with alternatives like unload_model, the context is sufficient for understanding when to invoke this tool.

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/AIops-tools/AI-Guardian'

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