get_effective_oop_policy
Retrieve the effective Object-Oriented Programming validation policy for TwinCAT 3 XML files or directories to ensure code quality and IEC 61131-3 compliance.
Instructions
Get effective OOP validation policy for a file or directory target.
Args: target_path: Optional path to a file or directory. If omitted, uses current working directory defaults.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The handler for get_effective_oop_policy tool implementation.
def get_effective_oop_policy(target_path: str = "") -> str: """Get effective OOP validation policy for a file or directory target. Args: target_path: Optional path to a file or directory. If omitted, uses current working directory defaults. """ _t0 = time.monotonic() try: policy_target = _resolve_policy_target_path(target_path) resolved = config.resolve_oop_policy(policy_target) result = { "success": True, "target_path": str(policy_target), "policy_source": resolved["source"], "policy": resolved["policy"], } return _with_meta(result, _t0) except Exception as e: return _tool_error(str(e), file_path=target_path or None, start_time=_t0)