mcp_ollama_rm
Remove Ollama models by name within the Ontology MCP server to manage and optimize AI model storage and performance for ontology data interactions.
Instructions
Ollama 모델을 삭제합니다
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 삭제할 모델 이름 |
Implementation Reference
- src/services/ollama-service.ts:192-210 (handler)Core handler implementation that sends DELETE request to Ollama API /api/delete to remove the specified model.
async removeModel(args: { name: string }): Promise<string> { try { const response = await axios.delete( this.getApiUrl('delete'), { data: { name: args.name } } ); return JSON.stringify(response.data, null, 2); } catch (error) { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `Ollama API 오류: ${error.response?.data?.error || error.message}` ); } throw new McpError(ErrorCode.InternalError, `모델 삭제에 실패했습니다: ${formatError(error)}`); } } - src/tools/index.ts:375-398 (registration)Tool registration including name, description, input schema, and thin wrapper handler that delegates to ollamaService.removeModel.
{ name: 'mcp_ollama_rm', description: 'Ollama 모델을 삭제합니다', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '삭제할 모델 이름' } }, required: ['name'] }, async handler(args: any): Promise<ToolResponse> { const result = await ollamaService.removeModel(args); return { content: [ { type: 'text' as const, text: result } ] }; } - src/index.ts:35-35 (registration)MCP server capabilities declaration enabling the mcp_ollama_rm tool.
mcp_ollama_rm: true, - src/tools/index.ts:378-387 (schema)Input schema defining the required 'name' parameter for the tool.
inputSchema: { type: 'object', properties: { name: { type: 'string', description: '삭제할 모델 이름' } }, required: ['name'] },