Skip to main content
Glama
mdz-axo

PT-MCP (Paul Test Man Context Protocol)

by mdz-axo

validate_context

Verify accuracy and completeness of context files for codebase analysis by checking specified validation criteria against project directories.

Instructions

Validate accuracy and completeness of generated context files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRoot directory path
context_pathYesPath to context files to validate
checksNoValidation checks to perform

Implementation Reference

  • The main handler function for the 'validate_context' tool. It takes ValidateContextArgs and returns a standardized MCP content response. Currently implements a placeholder that returns a pending message.
    export async function validateContext( args: ValidateContextArgs ): Promise<{ content: Array<{ type: string; text: string }> }> { return { content: [ { type: "text", text: JSON.stringify( { message: "Context validation - implementation pending", path: args.path, }, null, 2 ), }, ], }; }
  • Type definition for the input arguments of the validateContext handler, matching the tool's inputSchema.
    interface ValidateContextArgs { path: string; context_path: string; checks?: string[]; }
  • Tool dispatch registration in the CallToolRequestSchema handler switch statement, calling the validateContext function.
    case "validate_context": return await validateContext(args as any);
  • src/index.ts:306-328 (registration)
    Tool metadata registration in the ListToolsRequestSchema response, including name, description, and JSON inputSchema.
    { name: "validate_context", description: "Validate accuracy and completeness of generated context files", inputSchema: { type: "object", properties: { path: { type: "string", description: "Root directory path", }, context_path: { type: "string", description: "Path to context files to validate", }, checks: { type: "array", items: { type: "string" }, description: "Validation checks to perform", }, }, required: ["path", "context_path"], }, },
  • The registerTools function that sets up the overall tool request handler (CallToolRequestSchema), which dispatches to specific tool handlers based on name.
    export function registerTools(server: Server) { server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { if (!args) { throw new Error("Missing arguments"); } switch (name) { case "analyze_codebase": return await analyzeCodebase(args as any); case "enrich_context": { const result = await enrichContext(args as any); const formatted = formatEnrichedContext(result); return { content: [ { type: "text", text: formatted, }, ], }; } case "generate_context": return await generateContext(args as any); case "update_context": return await updateContext(args as any); case "extract_patterns": return await extractPatterns(args as any); case "analyze_dependencies": return await analyzeDependencies(args as any); case "watch_project": return await watchProject(args as any); case "extract_api_surface": return await extractApiSurface(args as any); case "validate_context": return await validateContext(args as any); default: throw new Error(`Unknown tool: ${name}`); } } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Error executing ${name}: ${errorMessage}`, }, ], isError: true, }; } }); }

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/mdz-axo/pt-mcp'

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