Skip to main content
Glama
Cicatriiz

Civitai MCP Server

get_top_rated_models

Retrieve the highest-rated AI models from Civitai's collection, filtering by time period (AllTime, Year, Month, Week, Day) and limiting results (1-100).

Instructions

Get the highest rated models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of models to return (default: 20)
periodNoTime period for rating ranking (default: AllTime)

Implementation Reference

  • The primary handler function for the 'get_top_rated_models' tool. It invokes the CivitaiClient helper, formats the response using formatModelsResponse, and constructs a markdown-formatted text response listing the top-rated models.
    private async getTopRatedModels(args: any) {
      const response = await this.client.getTopRatedModels(args.period, args.limit);
      const formatted = this.formatModelsResponse(response);
      
      return {
        content: [
          {
            type: 'text',
            text: `# Top Rated Models (${args.period || 'AllTime'})\\n\\n${formatted.models.map((model: any, index: number) => 
              `${index + 1}. **${model.name}** (${model.type})\\n` +
              `   Creator: ${model.creator}\\n` +
              `   Rating: ${model.stats.rating.toFixed(1)} ⭐ (${model.stats.downloads.toLocaleString()} downloads)\\n\\n`
            ).join('')}`,
          },
        ],
      };
  • src/index.ts:243-257 (registration)
    Tool registration entry in the getTools() method, defining the tool name, description, and input schema for MCP tool listing.
    {
      name: 'get_top_rated_models',
      description: 'Get the highest rated models',
      inputSchema: {
        type: 'object',
        properties: {
          period: {
            type: 'string',
            enum: ['AllTime', 'Year', 'Month', 'Week', 'Day'],
            description: 'Time period for rating ranking (default: AllTime)'
          },
          limit: { type: 'number', description: 'Number of models to return (default: 20)', minimum: 1, maximum: 100 },
        },
      },
    },
  • Input schema definition for the get_top_rated_models tool, specifying parameters for period and limit.
    inputSchema: {
      type: 'object',
      properties: {
        period: {
          type: 'string',
          enum: ['AllTime', 'Year', 'Month', 'Week', 'Day'],
          description: 'Time period for rating ranking (default: AllTime)'
        },
        limit: { type: 'number', description: 'Number of models to return (default: 20)', minimum: 1, maximum: 100 },
      },
    },
  • Helper method in CivitaiClient class that constructs API parameters for fetching top-rated models (sort='Highest Rated') and calls the general getModels API method.
    async getTopRatedModels(period: string = 'AllTime', limit: number = 20): Promise<ModelsResponse> {
      return this.getModels({
        sort: 'Highest Rated',
        period,
        limit,
        nsfw: false
      });
    }
  • Dispatch case in the CallToolRequestSchema handler that routes 'get_top_rated_models' calls to the specific handler method.
    case 'get_top_rated_models':
      return await this.getTopRatedModels(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation ('Get') but lacks details on permissions, rate limits, pagination, or response format. While it implies a ranking based on ratings, it does not specify how ratings are calculated or if the tool is safe/read-only, leaving significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, making it easy to parse. However, it is front-loaded but overly brief, potentially under-specifying the tool's purpose without sacrificing clarity in its minimal form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a ranking query with parameters) and lack of annotations or output schema, the description is incomplete. It fails to explain what 'highest rated' means, how results are sorted, or what the return structure entails, leaving critical context gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, documenting both parameters ('limit' and 'period') with details like defaults and enum values. The description adds no additional meaning beyond the schema, as it does not explain parameter usage or interactions. Baseline 3 is appropriate since the schema adequately covers parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the highest rated models' states a clear verb ('Get') and resource ('highest rated models'), establishing a basic purpose. However, it lacks specificity about what constitutes 'highest rated' (e.g., based on user ratings, downloads, or other metrics) and does not differentiate from siblings like 'get_popular_models' or 'get_latest_models', leaving ambiguity in scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, exclusions, or comparisons to sibling tools such as 'get_popular_models' or 'get_latest_models', offering no context for selection among similar list-retrieval functions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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