show_model
Retrieve detailed information about an Ollama model, including its modelfile excerpt, parameters, template, capabilities, architecture, and quantization level.
Instructions
Show detailed information for a specific model: modelfile excerpt, parameters, template, capabilities, architecture details, quantization level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Model name (e.g. "llama3.1:8b" or "forge:b6c1"). |
Implementation Reference
- server.js:160-176 (handler)The showModel function — the tool handler for 'show_model'. It validates the required 'name' argument, calls Ollama's POST /api/show endpoint, and returns model details (modelfile excerpt, parameters, template, capabilities, details, model_info_keys, modified_at).
async function showModel(args) { const bad = requireString(args, 'name'); if (bad) return errorResult(bad); const r = await httpRequest('POST', '/api/show', { name: args.name }); if (r.error) return errorResult(r.error); const d = r.data || {}; return textResult({ name: args.name, modelfile_excerpt: typeof d.modelfile === 'string' ? d.modelfile.slice(0, 500) : null, parameters: d.parameters || null, template: d.template || null, capabilities: d.capabilities || [], details: d.details || null, model_info_keys: d.model_info ? Object.keys(d.model_info).slice(0, 30) : [], modified_at: d.modified_at || null, }); } - server.js:294-305 (schema)Tool registration entry for 'show_model' in the TOOLS array, defining its description, annotations, and inputSchema (requires 'name' string).
{ name: 'show_model', description: 'Show detailed information for a specific model: modelfile excerpt, parameters, template, capabilities, architecture details, quantization level.', annotations: { title: 'Show model details', readOnlyHint: true, destructiveHint: false, openWorldHint: false }, inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Model name (e.g. "llama3.1:8b" or "forge:b6c1").' }, }, required: ['name'], additionalProperties: false, }, - server.js:385-394 (registration)The HANDLERS mapping object that registers the string 'show_model' to the showModel function for dispatch.
const HANDLERS = { ollama_status: ollamaStatus, list_models: listModels, list_running: listRunning, show_model: showModel, generate: generate, chat: chat, pull_model: pullModel, delete_model: deleteModel, }; - server.js:49-51 (helper)The textResult helper utility used by showModel to wrap JSON output in MCP's content format.
function textResult(obj) { return { content: [{ type: 'text', text: JSON.stringify(obj, null, 2) }] }; }