judgevet.adapters.inbound.mcp_policy

Status: draft.

judgevet.adapters.inbound.mcp_policy

Keyed policy evaluation with strict question fields before provider dispatch.

Source: https://github.com/Alberto-Codes/judgevet/issues/202#issuecomment-5851056470. Service errors return tool error results through the shared ask handler helper. A tripped spend cap says a restart is required on every path.

Examples:

from judgevet.adapters.inbound.mcp_policy import handle_evaluate_policy

assert callable(handle_evaluate_policy)
See Also

handle_evaluate_policy(port, mcp_types, params, *, model) async

Evaluate text or media with host-selected model and strict policy rules.

Parameters:

Name Type Description Default
port ProviderDispatch

Existing serialized dispatcher.

required
mcp_types Any

SDK type constructors.

required
params Any

SDK tool parameters.

required
model str

Host-selected model.

required

Returns:

Type Description
Any

Matching text and structured envelopes, or a declared tool error

Any

from the shared tool error helper. A tripped spend cap says a restart

Any

is required, on the media path too.

Raises:

Type Description
Exception

Unexpected implementation failures retain SDK handling.