Class McpOptions
- Namespace
- Openshell.Sandbox.V1
- Assembly
- OpenShell.Sdk.dll
MCP options are grouped so MCP-specific policy can grow without adding more top-level NetworkEndpoint fields. OpenShell owns the supported revision profiles instead of treating dependency enums as the policy contract.
Sources:
public sealed class McpOptions : IMessage<McpOptions>, IEquatable<McpOptions>, IDeepCloneable<McpOptions>, IBufferMessage, IMessage
- Inheritance
-
McpOptions
- Implements
-
IMessage<McpOptions>IDeepCloneable<McpOptions>IBufferMessageIMessage
- Inherited Members
Constructors
McpOptions()
public McpOptions()
McpOptions(McpOptions)
public McpOptions(McpOptions other)
Parameters
otherMcpOptions
Fields
AllowAllKnownMcpMethodsFieldNumber
Field number for the "allow_all_known_mcp_methods" field.
public const int AllowAllKnownMcpMethodsFieldNumber = 2
Field Value
StrictToolNamesFieldNumber
Field number for the "strict_tool_names" field.
public const int StrictToolNamesFieldNumber = 1
Field Value
VersionsFieldNumber
Field number for the "versions" field.
public const int VersionsFieldNumber = 3
Field Value
Properties
AllowAllKnownMcpMethods
Method-layer default for MCP endpoints. When true, OpenShell allows parsed MCP-family methods at the method layer unless a tool-name policy narrows tools/call. When unset or false, explicit method rules are required.
public bool AllowAllKnownMcpMethods { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
HasAllowAllKnownMcpMethods
Gets whether the "allow_all_known_mcp_methods" field is set
public bool HasAllowAllKnownMcpMethods { get; }
Property Value
HasStrictToolNames
Gets whether the "strict_tool_names" field is set
public bool HasStrictToolNames { get; }
Property Value
Parser
public static MessageParser<McpOptions> Parser { get; }
Property Value
- MessageParser<McpOptions>
StrictToolNames
Hardening boundary for tools/call params.name. When unset or true, the supervisor enforces the MCP recommended tool-name syntax ^[A-Za-z0-9_.-]{1,128}$ before policy evaluation. Set false only for compatibility with servers that intentionally use non-recommended names.
Source:
public bool StrictToolNames { get; set; }
Property Value
Versions
Exact MCP protocol revisions accepted by the endpoint's policy schema. Authors may omit this field. Because proto3 repeated fields do not retain presence, omission reaches protobuf ingress as an empty list. Checked normalization materializes OpenShell's pinned default revision "2025-11-25" before producing canonical downstream state, which is always nonempty.
An explicit nonempty list remains an exact allowlist. Duplicates, moving aliases such as "draft" and "latest", and unknown dates are invalid. Normalization stores valid values in canonical semantic order. These values identify core revisions; they do not enable separate SEP overlays or select runtime parsing and forwarding behavior.
public RepeatedField<string> Versions { get; }
Property Value
- RepeatedField<string>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
ClearAllowAllKnownMcpMethods()
Clears the value of the "allow_all_known_mcp_methods" field
public void ClearAllowAllKnownMcpMethods()
ClearStrictToolNames()
Clears the value of the "strict_tool_names" field
public void ClearStrictToolNames()
Clone()
Creates a deep clone of this object.
public McpOptions Clone()
Returns
- McpOptions
A deep clone of this object.
Equals(McpOptions)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(McpOptions other)
Parameters
otherMcpOptionsAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(McpOptions)
Merges the given message into this one.
public void MergeFrom(McpOptions other)
Parameters
otherMcpOptions
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.