Skip to main content
Glama
mdz-axo

PT-MCP (Paul Test Man Context Protocol)

by mdz-axo

update_context

Update context files incrementally by analyzing code changes to maintain accurate project documentation and semantic understanding.

Instructions

Incrementally update existing context files based on code changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRoot directory path
changed_filesYesList of changed file paths
context_formatYesContext format to update
force_full_regenerationNoForce complete regeneration instead of incremental update

Implementation Reference

  • The main handler function implementing the update_context tool logic. Currently a placeholder that returns a JSON message indicating pending implementation.
    export async function updateContext( args: UpdateContextArgs ): Promise<{ content: Array<{ type: string; text: string }> }> { return { content: [ { type: "text", text: JSON.stringify( { message: "Context update - implementation pending", changed_files: args.changed_files.length, }, null, 2 ), }, ], }; }
  • TypeScript interface defining the input parameters for the updateContext handler function.
    interface UpdateContextArgs { path: string; changed_files: string[]; context_format: string; force_full_regeneration?: boolean; }
  • Dispatch case in the CallToolRequestSchema handler that routes 'update_context' calls to the updateContext function.
    case "update_context": return await updateContext(args as any);
  • JSON Schema definition and metadata for the update_context tool, provided in the ListTools response.
    { name: "update_context", description: "Incrementally update existing context files based on code changes", inputSchema: { type: "object", properties: { path: { type: "string", description: "Root directory path", }, changed_files: { type: "array", items: { type: "string" }, description: "List of changed file paths", }, context_format: { type: "string", enum: ["cursorrules", "cursor_dir", "spec_md", "agents_md"], description: "Context format to update", }, force_full_regeneration: { type: "boolean", description: "Force complete regeneration instead of incremental update", default: false, }, }, required: ["path", "changed_files", "context_format"], }, },
  • src/tools/index.ts:9-9 (registration)
    Import statement bringing the updateContext handler into the tools dispatcher module.
    import { updateContext } from "./update-context.js";

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