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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_effective_oop_policy"
}
}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)