|
Option C Tools
|
Public Member Functions | |
| None | __init__ (self, McpProfile profile="default", bool safe_mode=False) |
| McpProfile | profile (self) |
| PolicyDecision | check (self, str tool_name) |
Protected Attributes | |
| McpProfile | _profile = profile |
| bool | _safe_mode = safe_mode |
Stateless policy engine for the MCP tool manifest.
Parameters
----------
profile
Active MCP profile. One of ``"default"``, ``"strict"``, or
``"airgapped"``.
safe_mode
If ``True``, all tool calls are denied regardless of profile.
Mirrors ``McpConfig.safe_mode``.
| None oct.mcp.policy.McpPolicy.__init__ | ( | self, | |
| McpProfile | profile = "default", | ||
| bool | safe_mode = False ) |
| PolicyDecision oct.mcp.policy.McpPolicy.check | ( | self, | |
| str | tool_name ) |
Check whether *tool_name* is permitted under the active policy.
Parameters
----------
tool_name
MCP tool name, e.g. ``"oct_lint"``.
Returns
-------
:class:`PolicyDecision` with ``allowed=True`` or ``allowed=False``.
Never raises.
Definition at line 295 of file policy.py.
| McpProfile oct.mcp.policy.McpPolicy.profile | ( | self | ) |
|
protected |
|
protected |