show
Retrieve detailed information about a specific Ollama model to understand its capabilities and configuration before use.
Instructions
Show information for a model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the model |
Implementation Reference
- src/index.ts:324-338 (handler)The main handler function for the 'show' tool. It executes the 'ollama show' CLI command with the model name from arguments and returns the output as text content in the MCP response format. Handles errors by throwing McpError.private async handleShow(args: any) { try { const { stdout, stderr } = await execAsync(`ollama show ${args.name}`); return { content: [ { type: 'text', text: stdout || stderr, }, ], }; } catch (error) { throw new McpError(ErrorCode.InternalError, `Failed to show model info: ${formatError(error)}`); } }
- src/index.ts:98-108 (schema)Input schema definition for the 'show' tool, requiring a 'name' property of type string.inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the model', }, }, required: ['name'], additionalProperties: false, },
- src/index.ts:95-109 (registration)Tool registration in the listTools handler response, defining name, description, and input schema for 'show'.{ name: 'show', description: 'Show information for a model', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the model', }, }, required: ['name'], additionalProperties: false, }, },
- src/index.ts:260-261 (registration)Dispatch case in the CallToolRequestHandler switch statement that routes 'show' tool calls to the handleShow method.case 'show': return await this.handleShow(request.params.arguments);