Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesName of the model

Implementation Reference

  • 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)}`); } }
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NightTrek/Ollama-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server