Skip to main content
Glama

get_file_approval_status

Check if a file has been approved for modification within the MCP Memory Server's safety workflow to prevent unauthorized changes.

Instructions

Get approval status for a file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file

Implementation Reference

  • MCP tool handler for 'get_file_approval_status' that extracts the filePath argument, calls memoryManager.getFileApprovalStatus, and returns JSON-stringified result.
    case 'get_file_approval_status': { const filePath = args.filePath as string; const approval = await this.memoryManager.getFileApprovalStatus(filePath); return { content: [{ type: 'text', text: JSON.stringify(approval, null, 2) }] }; }
  • src/index.ts:615-625 (registration)
    Registration of the 'get_file_approval_status' tool in the ListTools response, including input schema definition.
    { name: 'get_file_approval_status', description: 'Get approval status for a file', inputSchema: { type: 'object', properties: { filePath: { type: 'string', description: 'Path to the file' } }, required: ['filePath'] } },
  • Core helper function implementing the logic to retrieve file approval status from project memory by relative path.
    async getFileApprovalStatus(filePath: string): Promise<ApprovalStatus | null> { const memory = await this.getProjectMemory(); const relativePath = path.relative(this.projectRoot, filePath); return memory.approvalStates[relativePath] || null; }
  • TypeScript interface defining the ApprovalStatus structure used as return type for the tool.
    export interface ApprovalStatus { devApproved?: boolean; devApprovedBy?: string; devApprovedDate?: string; codeReviewApproved?: boolean; codeReviewApprovedBy?: string; codeReviewDate?: string; qaApproved?: boolean; qaApprovedBy?: string; qaApprovedDate?: string; }

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/keleshteri/mcp-memory'

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