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
| Name | Required | Description | Default |
|---|---|---|---|
| modelVersionId | Yes | The ID of the model version to retrieve |
Implementation Reference
- src/index.ts:449-475 (handler)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'], }, },
- src/index.ts:145-151 (schema)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'], },
- src/index.ts:53-54 (handler)Dispatch handler in the CallToolRequestSchema switch statement.case 'get_model_version': return await this.getModelVersion(args);
- src/civitai-client.ts:129-132 (helper)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); }