mcp_ollama_list
Retrieve a list of available Ollama models on the Ontology MCP server to facilitate AI-driven ontology data queries and manipulations.
Instructions
사용 가능한 Ollama 모델 목록을 조회합니다
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/index.ts:363-372 (handler)MCP tool handler for 'mcp_ollama_list' that delegates to ollamaService.listModels() and formats the response.async handler(args: any): Promise<ToolResponse> { const result = await ollamaService.listModels(); return { content: [ { type: 'text' as const, text: result } ] };
- src/tools/index.ts:359-362 (schema)Input schema for mcp_ollama_list tool (no parameters required).inputSchema: { type: 'object', properties: {} },
- src/index.ts:34-34 (registration)Tool capability registration in MCP server capabilities.mcp_ollama_list: true,
- Core implementation of model listing via Ollama /api/tags endpoint.async listModels(): Promise<string> { try { const response = await axios.get(this.getApiUrl('tags')); return JSON.stringify(response.data, null, 2); } catch (error) { throw new McpError(ErrorCode.InternalError, `모델 목록을 가져오는데 실패했습니다: ${formatError(error)}`); } }
- src/tools/index.ts:356-373 (registration)Full tool registration object including name, description, schema, and handler in the exported tools array.{ name: 'mcp_ollama_list', description: '사용 가능한 Ollama 모델 목록을 조회합니다', inputSchema: { type: 'object', properties: {} }, async handler(args: any): Promise<ToolResponse> { const result = await ollamaService.listModels(); return { content: [ { type: 'text' as const, text: result } ] }; }