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,
          };
        }
      });
    }
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 mentions validation of 'accuracy and completeness' but doesn't specify what validation entails (e.g., checks performed, output format, error handling, or permissions required). This leaves significant gaps in understanding the tool's behavior beyond its basic purpose.

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, clear sentence that efficiently conveys 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 validation operations and the lack of annotations and output schema, the description is insufficient. It doesn't explain what validation results look like, what happens on failure, or how it interacts with sibling tools. For a tool with 3 parameters and no structured behavioral hints, more context is needed to be complete.

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%, so all parameters are documented in the schema. The description doesn't add any additional meaning or context for the parameters beyond what the schema provides (e.g., it doesn't explain what 'checks' might include or how 'path' and 'context_path' relate). Baseline 3 is appropriate when the schema handles parameter documentation adequately.

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 with a specific verb ('validate') and resource ('generated context files'), and specifies what is being validated ('accuracy and completeness'). However, it doesn't explicitly differentiate this validation tool from sibling tools like 'analyze_codebase' or 'enrich_context', which might also involve context file operations.

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 'enrich_context' or 'update_context', nor does it mention prerequisites or exclusions. It simply states what the tool does without contextual usage information.

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

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