show
Retrieve detailed information about a specific Ollama model, including its configuration, parameters, and capabilities, to understand and verify model properties before use.
Instructions
Show information for a model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/index.ts:54-61 (handler)The handler function for the 'show' tool. It takes a model name, calls ollama.show to retrieve model information, formats it as JSON, and returns it. Includes error handling using the formatError helper.async ({ name }) => { try { const result = await ollama.show({ model: name }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true }; } }
- src/index.ts:52-52 (schema)Input schema for the 'show' tool, validating the 'name' parameter as a string using Zod.inputSchema: { name: z.string() },
- src/index.ts:47-62 (registration)Registration of the 'show' tool on the MCP server, including the tool name, metadata, input schema, and inline handler function.server.registerTool( "show", { title: "Show model info", description: "Show information for a model", inputSchema: { name: z.string() }, }, async ({ name }) => { try { const result = await ollama.show({ model: name }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${formatError(error)}` }], isError: true }; } } );