MV Help to get map's information such as blocks or building's positions by JS script

Issue Summary
How get map's information such as blocks or building's positions by JS script.

Details
I created a 100gptgame project in GitHub and trying to add AI support into the RPG maker MV. It basically works. But one major challenge is helping the AI understand in-game factors.
For example, I want to create an AI-driven NPC to complete a specific task. However, since the NPC lacks any visual perception, it's difficult to get the necessary game state by using JS script—like the other NPC's behaviors or the map's information such as blocks or building's positions.

Are you using any plugins? — If yes, I created a plugin to call the OpenAI API.

game1-plugin.png
The map data does not include any information about buildings etc - it only contains information about tiles, The buildings are then created from those tiles, but there is no specific information for that anywhere.

The event command "get location info" and its javascript equivalent can read out all information that exists on the map.
You can use that to learn what information is available and can be read out.

Original thread: https://forums.rpgmakerweb.com/threads/help-to-get-maps-information-such-as-blocks-or-buildings-positions-by-js-script.177991/