Skip to main content
Glama

suggest_category

Use AI to identify the appropriate category for a course based on its title and description, helping organize educational content effectively.

Instructions

Sugere categoria mais apropriada para um curso usando IA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTítulo do curso
descriptionYesDescrição do curso

Implementation Reference

  • MCP tool handler for 'suggest_category': extracts input args, calls curationService.curateCourse, and returns the suggestedCategory in MCP content format.
    private async handleSuggestCategory(args: any) {
      const { title, description } = args;
      const content = { title, description };
      const result = await this.curationService.curateCourse(content);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              suggestedCategory: result.suggestedCategory,
              aiEnabled: this.curationService.getAIStatus().enabled
            }, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'suggest_category' tool, specifying required title and description fields.
    inputSchema: {
      type: 'object',
      properties: {
        title: { type: 'string', description: 'Título do curso' },
        description: { type: 'string', description: 'Descrição do curso' },
      },
      required: ['title', 'description'],
    },
  • src/server.ts:76-96 (registration)
    Registration of tool handlers via MCP CallToolRequestSchema, including switch case dispatching 'suggest_category' to its handler.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        switch (name) {
          case 'suggest_category':
            return await this.handleSuggestCategory(args);
          case 'suggest_tags':
            return await this.handleSuggestTags(args);
          case 'improve_content':
            return await this.handleImproveContent(args);
          default:
            throw new McpError(ErrorCode.MethodNotFound, `Ferramenta desconhecida: ${name}`);
        }
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(ErrorCode.InternalError, `Erro ao executar ${name}: ${error}`);
      }
    });
  • src/server.ts:37-48 (registration)
    Tool specification registration in MCP ListToolsRequestSchema response, including name, description, and schema.
    {
      name: 'suggest_category',
      description: 'Sugere categoria mais apropriada para um curso usando IA',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: 'Título do curso' },
          description: { type: 'string', description: 'Descrição do curso' },
        },
        required: ['title', 'description'],
      },
    },
  • Helper method in curation service that invokes AI suggestion and maps to valid category or defaults.
    private async suggestCategory(content: CourseContent): Promise<CurationSuggestion['suggestedCategory']> {
      const aiResult = await this.aiService.suggestCategoryWithAI(content, this.categories);
      
      if (aiResult && aiResult.categoryId) {
        const category = this.categories.find(c => c.id === aiResult.categoryId);
        if (category) {
          return {
            id: category.id,
            name: category.name,
            confidence: aiResult.confidence,
            reasoning: aiResult.reasoning
          };
        }
      }
    
      const defaultCategory = this.categories[0];
      return {
        id: defaultCategory.id,
        name: defaultCategory.name,
        confidence: 0.3,
        reasoning: 'Categoria padrão - não foi possível analisar o conteúdo'
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool uses AI ('usando IA'), which hints at automated processing, but doesn't describe key behaviors: it doesn't specify if this is a read-only operation, what the output format might be (e.g., a single category or multiple suggestions), potential limitations like accuracy or rate limits, or any side effects. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 in Portuguese that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Sugere categoria'), making it easy to parse. However, it could be slightly more structured by including key details like output or usage context, but as is, it earns its place concisely.

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 context: no annotations, no output schema, and a tool that likely involves AI processing with two parameters, the description is incomplete. It doesn't explain what the tool returns (e.g., a category name or list), any behavioral traits like reliability or speed, or how it integrates with sibling tools. For a tool with no structured data beyond the input schema, the description should provide more context to be fully helpful.

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, with clear documentation for both parameters ('title' and 'description' of the course). The description adds no additional meaning beyond what the schema provides—it doesn't explain how these inputs are used by the AI, any constraints on their content, or examples. With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Sugere categoria mais apropriada para um curso usando IA' (Suggests the most appropriate category for a course using AI). It specifies the verb 'sugere' (suggests), the resource 'categoria' (category), and the context 'para um curso' (for a course). However, it doesn't explicitly differentiate from sibling tools like 'improve_content' or 'suggest_tags', which likely serve different purposes (e.g., content improvement vs. tag suggestion).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools ('improve_content', 'suggest_tags') or specify contexts where this tool is preferred, such as for initial course categorization versus other categorization methods. There's also no information on prerequisites or exclusions, leaving usage entirely implied from the purpose statement.

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

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/alexandrekumagae/ai-content-categorization-mcp'

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