Skip to main content
Glama

evaluate_readme

Assess and improve README file structure in repositories by analyzing content quality, identifying gaps, and providing actionable suggestions for documentation enhancement.

Instructions

リポジトリ内の全てのREADMEファイルの構成を評価し、改善点を提案します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesプロジェクトのルートディレクトリパス

Implementation Reference

  • src/index.ts:40-57 (registration)
    Registers the 'evaluate_readme' tool by handling ListToolsRequestSchema and providing name, description, and input schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'evaluate_readme',
          description: 'リポジトリ内の全てのREADMEファイルの構成を評価し、改善点を提案します',
          inputSchema: {
            type: 'object',
            properties: {
              projectPath: {
                type: 'string',
                description: 'プロジェクトのルートディレクトリパス',
              },
            },
            required: ['projectPath'],
          },
        },
      ],
    }));
  • Input schema definition for the evaluate_readme tool requiring a projectPath string.
    inputSchema: {
      type: 'object',
      properties: {
        projectPath: {
          type: 'string',
          description: 'プロジェクトのルートディレクトリパス',
        },
      },
      required: ['projectPath'],
    },
  • Main handler for the 'evaluate_readme' tool call. Checks tool name, extracts projectPath, calls ReadmeService.evaluateAllReadmes, and formats response.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (request.params.name !== 'evaluate_readme') {
        throw new McpError(
          ErrorCode.MethodNotFound,
          `Unknown tool: ${request.params.name}`
        );
      }
    
      const { projectPath } = request.params.arguments as { projectPath: string };
      
      try {
        const evaluations = await this.readmeService.evaluateAllReadmes(projectPath);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(evaluations, null, 2),
            },
          ],
        };
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: 'text',
              text: `評価中にエラーが発生しました: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    });
  • Helper method that finds all README files in the project and evaluates each using evaluateReadme.
    public async evaluateAllReadmes(projectPath: string): Promise<ReadmeEvaluation[]> {
      const readmeFiles = await findReadmeFiles(projectPath);
      const evaluations: ReadmeEvaluation[] = [];
    
      for (const readmePath of readmeFiles) {
        const dirPath = path.dirname(readmePath);
        const evaluation = await this.evaluateReadme(dirPath, readmePath);
        evaluations.push(evaluation);
      }
    
      return evaluations;
    }
  • Core evaluation logic for a single README file: parses content, evaluates badges, header image, title, calculates score, generates suggestions.
    private async evaluateReadme(dirPath: string, readmePath: string): Promise<ReadmeEvaluation> {
      const content = fs.readFileSync(readmePath, 'utf-8');
      const badgeEvaluation = this.evaluateLanguageBadges(content);
    
      const evaluation: ReadmeEvaluation = {
        filePath: readmePath,
        hasHeaderImage: false,
        headerImageQuality: {
          hasGradient: false,
          hasAnimation: false,
          hasRoundedCorners: false,
          hasEnglishText: false,
          isProjectSpecific: false,
        },
        isCentered: {
          headerImage: false,
          title: false,
          badges: badgeEvaluation.isCentered,
        },
        hasBadges: {
          english: badgeEvaluation.hasEnglishBadge,
          japanese: badgeEvaluation.hasJapaneseBadge,
          isCentered: badgeEvaluation.isCentered,
          hasCorrectFormat: badgeEvaluation.hasCorrectFormat,
        },
        hasReadme: {
          english: fs.existsSync(path.join(dirPath, 'README.md')),
          japanese: fs.existsSync(path.join(dirPath, 'README.ja.md')),
        },
        score: 0,
        suggestions: [],
      };
    
      // marked.parseは非同期なので、awaitを使用
      const html = await Promise.resolve(marked.parse(content));
      const $ = cheerio.load(html);
    
      // その他の評価ロジック...
      this.evaluateHeaderImage($, evaluation, content);
      this.evaluateTitle($, evaluation);
      
      this.calculateScore(evaluation);
      this.generateSuggestions(evaluation, dirPath, readmePath);
    
      return evaluation;
    }
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 evaluation and proposal of improvements but does not specify how the evaluation is performed (e.g., criteria, depth), what format the proposals take, whether it modifies files or only reports, 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 Japanese that directly states the tool's function without unnecessary words. It is front-loaded with the core action and outcome, making it easy to parse. This minimal structure earns a top score for conciseness.

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 (evaluating and proposing improvements for README files) and the absence of annotations and output schema, the description is insufficient. It lacks details on evaluation criteria, output format, behavioral traits, and usage context. Without this information, an AI agent would struggle to understand the full scope and limitations of the tool.

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 the single parameter 'projectPath' clearly documented as 'プロジェクトのルートディレクトリパス' (project root directory path). The description does not add any additional meaning or context beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter semantics.

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: 'evaluate the structure of all README files in a repository and propose improvements.' It specifies the verb ('evaluate'), resource ('README files'), and outcome ('propose improvements'), making the intent unambiguous. However, since there are no sibling tools, it cannot demonstrate differentiation from alternatives, which prevents a perfect 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, prerequisites, or exclusions. It simply states what the tool does without context for its application. This lack of usage instructions limits its effectiveness for an AI agent in selecting the right tool for a scenario.

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/Sunwood-ai-labs/documind-mcp-server'

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