Skip to main content
Glama

validate_readme_checklist

Validate README files against community best practices checklist to ensure documentation quality with detailed scoring and actionable feedback.

Instructions

Validate README files against community best practices checklist with detailed scoring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
readmePathYesPath to the README file to validate
projectPathNoPath to project directory for additional context
strictNoUse strict validation rules
outputFormatNoOutput format for the validation reportconsole

Implementation Reference

  • Zod schema defining the input parameters for the validate_readme_checklist tool.
    export const ValidateReadmeChecklistSchema = z.object({ readmePath: z.string().min(1, "README path is required"), projectPath: z.string().optional(), strict: z.boolean().default(false), outputFormat: z.enum(["json", "markdown", "console"]).default("console"), });
  • The primary handler function that executes the tool's logic. Validates input schema and instantiates the validator class to perform the README checklist analysis.
    export async function validateReadmeChecklist( input: ValidateReadmeChecklistInput, ): Promise<ChecklistReport> { const validatedInput = ValidateReadmeChecklistSchema.parse(input); const validator = new ReadmeChecklistValidator(); return await validator.validateReadme(validatedInput); }
  • Core validation method in ReadmeChecklistValidator class that reads the README, iterates over checklist items, performs individual validations, and generates the report.
    async validateReadme( input: ValidateReadmeChecklistInput, ): Promise<ChecklistReport> { const readmeContent = await fs.readFile(input.readmePath, "utf-8"); const projectFiles = input.projectPath ? await this.getProjectFiles(input.projectPath) : []; const results: ValidationResult[] = []; const categories: { [key: string]: ValidationResult[] } = {}; // Run validation for each checklist item for (const item of this.checklist) { const result = await this.validateItem( item, readmeContent, projectFiles, input, ); results.push(result); if (!categories[item.category]) { categories[item.category] = []; } categories[item.category].push(result); } return this.generateReport(results, readmeContent); }

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/tosin2013/documcp'

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