Skip to main content
Glama

improve_content

Optimize course titles and descriptions by applying content best practices to enhance clarity and engagement.

Instructions

Melhora título e descrição de um curso seguindo boas práticas

Input Schema

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

Implementation Reference

  • src/server.ts:61-72 (registration)
    Registration of the 'improve_content' tool in the ListTools response, including name, description, and input schema definition.
    {
      name: 'improve_content',
      description: 'Melhora título e descrição de um curso seguindo boas práticas',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: 'Título atual do curso' },
          description: { type: 'string', description: 'Descrição atual do curso' },
        },
        required: ['title', 'description'],
      },
    },
  • Primary handler function for executing the 'improve_content' tool logic. Extracts input args, invokes curation service, and formats JSON response with title and description improvements.
    private async handleImproveContent(args: any) {
      const { title, description } = args;
      const content = { title, description };
      const result = await this.curationService.curateCourse(content);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              titleImprovement: result.titleImprovement,
              descriptionImprovement: result.descriptionImprovement,
              aiEnabled: this.curationService.getAIStatus().enabled
            }, null, 2),
          },
        ],
      };
    }
  • Core helper function implementing AI-powered title improvement using OpenAI GPT with a tailored prompt for course title best practices.
    async improveTitleWithAI(title: string, description: string): Promise<{
      suggestion: string;
      reasoning: string;
      improvements: string[];
    } | null> {
      if (!this.enabled) return null;
    
      try {
        const prompt = `
          Analise e melhore o seguinte título de curso:
    
          TÍTULO ATUAL: ${title}
          DESCRIÇÃO: ${description}
    
          Considere as boas práticas:
          - Comprimento ideal: 30-60 caracteres
          - Incluir nível (iniciante, intermediário, avançado)
          - Usar palavras-chave relevantes
          - Ser específico e claro
          - Usar números quando apropriado
    
          Responda em formato JSON:
          {
            "suggestion": "título_melhorado",
            "reasoning": "explicação_das_mudanças",
            "improvements": ["lista", "de", "melhorias", "aplicadas"]
          }
    
          Se o título já estiver bom, mantenha similar mas otimizado.
        `;
    
        const response = await this.openai.chat.completions.create({
          model: this.AIMODEL,
          messages: [{
            role: 'user',
            content: prompt
          }],
          temperature: 0.4,
          max_tokens: 250
        });
    
        const result = JSON.parse(response.choices[0].message.content || '{}');
        return result;
      } catch (error) {
        console.error('Error in AI title improvement:', error);
        return null;
      }
    }
  • Core helper function implementing AI-powered description improvement using OpenAI GPT with best practices prompt for course descriptions.
    async improveDescriptionWithAI(title: string, description: string): Promise<{
      suggestion: string;
      reasoning: string;
      improvements: string[];
    } | null> {
      if (!this.enabled) return null;
    
      try {
        const prompt = `
          Melhore a seguinte descrição de curso:
    
          TÍTULO: ${title}
          DESCRIÇÃO ATUAL: ${description}
    
          Boas práticas para descrições:
          - Comprimento ideal: 100-300 caracteres
          - Começar com benefício/resultado
          - Usar verbos de ação (aprenda, domine, desenvolva)
          - Incluir o que será aprendido
          - Call-to-action sutil
          - Linguagem clara e envolvente
    
          Responda em formato JSON:
          {
            "suggestion": "descrição_melhorada",
            "reasoning": "explicação_das_mudanças",
            "improvements": ["lista", "de", "melhorias", "aplicadas"]
          }
        `;
    
        const response = await this.openai.chat.completions.create({
          model: this.AIMODEL,
          messages: [{
            role: 'user',
            content: prompt
          }],
          temperature: 0.4,
          max_tokens: 350
        });
    
        const result = JSON.parse(response.choices[0].message.content || '{}');
        return result;
      } catch (error) {
        console.error('Error in AI description improvement:', error);
        return null;
      }
    }
  • Service method invoked by the handler that coordinates category/tag suggestions and content improvements, calling specific improveTitle and improveDescription methods.
    async curateCourse(content: CourseContent): Promise<CurationSuggestion> {
      if (!this.aiService.isEnabled()) {
        throw new Error('OpenAI API key is required. Please set OPENAI_API_KEY environment variable.');
      }
    
      const [
        suggestedCategory,
        suggestedTags,
        titleImprovement,
        descriptionImprovement
      ] = await Promise.all([
        this.suggestCategory(content),
        this.suggestTags(content),
        this.config.enableTitleSuggestions ? this.improveTitle(content.title, content.description) : Promise.resolve(undefined),
        this.config.enableDescriptionSuggestions ? this.improveDescription(content.title, content.description) : Promise.resolve(undefined)
      ]);
    
      return {
        suggestedCategory,
        suggestedTags,
        titleImprovement,
        descriptionImprovement
      };
    }
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 the tool improves content but doesn't explain how (e.g., does it rewrite, suggest alternatives, or validate?), what the output looks like, or any constraints like rate limits or permissions needed. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness5/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 is appropriately sized and front-loaded, making it easy to understand at a glance.

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 complexity of a content improvement tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'improves' entails, the format or nature of the output, or how it interacts with sibling tools. This leaves the agent with insufficient context to use the tool effectively.

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 schema description coverage is 100%, with clear descriptions for both parameters ('title' and 'description'). The description adds no additional meaning beyond what the schema provides, as it doesn't elaborate on parameter usage or constraints. Given the high schema coverage, the baseline score of 3 is appropriate.

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 action ('Melhora' - improves) and the resource ('título e descrição de um curso' - title and description of a course), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'suggest_category' or 'suggest_tags' which might also relate to course content optimization, so it doesn't reach the highest score.

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 like 'suggest_category' or 'suggest_tags'. It mentions 'seguindo boas práticas' (following good practices), which implies a context of quality improvement, but offers no explicit when/when-not instructions or comparisons to sibling tools.

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