Skip to main content
Glama

get_model_version

Retrieve detailed information about a specific AI model version by providing its unique ID, enabling users to access and manage model data on the Civitai MCP Server.

Instructions

Get detailed information about a specific model version

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelVersionIdYesThe ID of the model version to retrieve

Implementation Reference

  • Executes the tool logic: fetches model version via client and formats response as formatted text content.
    private async getModelVersion(args: any) { const { modelVersionId } = args; const version = await this.client.getModelVersion(modelVersionId); return { content: [ { type: 'text', text: `# ${version.model.name} - ${version.name}\\n\\n` + `**Model Type:** ${version.model.type}\\n` + `**Version ID:** ${version.id}\\n` + `**Created:** ${new Date(version.createdAt).toLocaleDateString()}\\n` + `**Downloads:** ${version.stats.downloadCount?.toLocaleString() || 0}\\n` + `**Rating:** ${version.stats.rating?.toFixed(1) || 'N/A'}\\n\\n` + `**Trained Words:** ${version.trainedWords.join(', ') || 'None'}\\n\\n` + `**Description:**\\n${version.description}\\n\\n` + `**Files (${version.files?.length || 0}):**\\n${version.files?.map(file => `- Size: ${file.sizeKb ? (file.sizeKb / 1024).toFixed(1) : 'Unknown'} MB\\n` + ` Format: ${file.metadata?.format || 'Unknown'}\\n` + ` FP: ${file.metadata?.fp || 'Unknown'}\\n` + ` Scans: Pickle=${file.pickleScanResult || 'Unknown'}, Virus=${file.virusScanResult || 'Unknown'}\\n` ).join('\\n') || 'No files available'}\\n` + `**Sample Images:** ${version.images.length} available`, }, ], }; }
  • src/index.ts:142-152 (registration)
    Tool registration in the getTools() method, defining name, description, and input schema.
    { name: 'get_model_version', description: 'Get detailed information about a specific model version', inputSchema: { type: 'object', properties: { modelVersionId: { type: 'number', description: 'The ID of the model version to retrieve' }, }, required: ['modelVersionId'], }, },
  • Input schema defining the required modelVersionId parameter.
    inputSchema: { type: 'object', properties: { modelVersionId: { type: 'number', description: 'The ID of the model version to retrieve' }, }, required: ['modelVersionId'], },
  • Dispatch handler in the CallToolRequestSchema switch statement.
    case 'get_model_version': return await this.getModelVersion(args);
  • CivitaiClient helper method that makes the API request to fetch model version data.
    async getModelVersion(modelVersionId: number): Promise<ModelVersionResponse> { const url = this.buildUrl(`/model-versions/${modelVersionId}`); return this.makeRequest<ModelVersionResponse>(url, ModelVersionResponseSchema); }

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/Cicatriiz/civitai-mcp-server'

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