#[Description('Look up ox_doorlock client functions by name. Returns function signature, parameters, return type, and usage examples for client-side door management.')]
classGetOxDoorlockClientFunctionextendsTool
{
/**
* Handle the tool request.
*/
publicfunctionhandle(Request$request):Response
{
$functionName=$request->get('function_name');
$language=$request->get('language','lua');
$function=$this->findFunction($functionName);
if(!$function){
returnResponse::text(sprintf("ox_doorlock client function '%s' not found. Check ox_doorlock documentation at https://coxdocs.dev/ox_doorlock",$functionName));
'returns'=>['type'=>'table|nil','description'=>'Door data or nil if no door nearby'],
'lua_example'=>"local door = exports.ox_doorlock:getClosestDoor()\nif door then\n print('Closest door ID: '..door.id)\n print('Door is locked: '..tostring(door.state == 1))\nend",
'js_example'=>"const door = exports.ox_doorlock.getClosestDoor();\nif (door) {\n console.log('Closest door ID: ' + door.id);\n console.log('Door is locked: ' + (door.state === 1));\n}",