Skip to main content
Glama
agenticcontrolio

TwinCAT Validator MCP Server

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

TableJSON Schema
NameRequiredDescriptionDefault
target_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It signals read-only intent via 'Get' and adds the important behavioral context that this resolves 'effective' (inherited/merged) policies rather than just local ones. However, it omits safety confirmations (read-only assurance), side effects, or computational cost of resolving effective policies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately compact with two sentences. The first states purpose immediately; the second documents the single parameter using a standard Args format. No extraneous information is present, though the 'Args:' structure is slightly formal for MCP descriptions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple getter tool with one optional parameter and an existing output schema (per context signals), the description is adequately complete. It covers the parameter semantics sufficiently and does not need to describe return values since an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Given 0% schema description coverage, the description effectively compensates by explaining that target_path is optional and documenting the default behavior (current working directory). This adds essential semantic meaning beyond the raw schema which only indicates a string type with empty default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get') and resource ('effective OOP validation policy') with scope ('for a file or directory target'). The term 'effective' distinguishes it from siblings like 'lint_oop_policy' or 'get_validation_summary' by implying resolution of inherited/cascading policies, though it could explicitly contrast with validation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implicit usage guidance by explaining the default behavior when target_path is omitted (uses current working directory). However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_validation_summary' or 'lint_oop_policy', or prerequisites for the target path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agenticcontrolio/twincat-validator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server