McpLimits class

Resource limits enforced by the ApolloVM MCP server.

These are the security knobs of the MCP runtime. Timeout is enforced per execution; the source/output caps bound the amount of data a single request can push through the server. Memory is NOT hard-capped by these values (Dart has no per-isolate heap cap) — see the doc/MCP.md security notes.

Constructors

McpLimits({int timeoutMs = 5000, int maxOutputChars = 65536, int maxSourceChars = 262144, int maxAstDepth = 200, Set<String> isolateTools = const {'apollovm.execute'}})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isolateTools Set<String>
Names of tools that run inside a spawned Isolate instead of in-process.
final
maxAstDepth int
Maximum depth of the serialized AST tree (apollovm.ast). Guards against pathological/deep trees producing huge payloads.
final
maxOutputChars int
Maximum number of characters of captured console (print) output kept for a single execution. Output past this cap is dropped and the result is flagged truncated: true.
final
maxSourceChars int
Maximum size (in characters) of an accepted source input. Larger inputs are rejected before parsing/execution.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeoutMs int
Maximum wall-clock time for a single apollovm.execute run, in milliseconds.
final

Methods

copyWith({int? timeoutMs, int? maxOutputChars, int? maxSourceChars, int? maxAstDepth, Set<String>? isolateTools}) McpLimits
Returns a copy of these limits with the given overrides.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runsInIsolate(String toolName) bool
Whether toolName should run inside an isolate.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited