get_file_approval_status
Check the approval status of a file using its file path to ensure compliance with safety controls and workflows on the MCP Memory Server.
Instructions
Get approval status for a file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file |
Implementation Reference
- src/index.ts:825-829 (handler)MCP server handler for the get_file_approval_status tool. Parses input arguments, delegates to MemoryManager.getFileApprovalStatus, and returns the approval status as JSON text.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:616-625 (registration)Tool registration in the MCP server's list of available tools, including name, description, and 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'] } },
- src/memory-manager.ts:218-222 (helper)Implementation of getFileApprovalStatus method in MemoryManager class. Loads project memory, computes relative file path, and retrieves or returns null for the file's approval status.async getFileApprovalStatus(filePath: string): Promise<ApprovalStatus | null> { const memory = await this.getProjectMemory(); const relativePath = path.relative(this.projectRoot, filePath); return memory.approvalStates[relativePath] || null; }