judgevet.adapters.inbound.mcp_handlers
Status: draft.
judgevet.adapters.inbound.mcp_handlers
MCP tool handlers and result formatting.
SDK fields follow the tagged SDK definitions. The factory supplies SDK types so importing this module needs no MCP runtime.
Examples:
from judgevet.adapters.inbound import mcp_handlers
assert callable(mcp_handlers.handle_ask_noul)
See Also
- judgevet.adapters.inbound.mcp: Server factory.
- judgevet.ports: Judgment port.
handle_ask_choice(port, mcp_types, params)
async
Handle the ask_choice tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
SystemOnePort
|
Judgment port. |
required |
mcp_types
|
Any
|
SDK type constructors. |
required |
params
|
Any
|
Tool call parameters. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
CallToolResult with structured content containing choice, probabilities, |
Any
|
confidence, model, usage. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If arguments are missing or answer is invalid. |
TypeError
|
If the answer has the wrong type. |
handle_ask_noul(port, mcp_types, params)
async
Handle the ask_noul tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
SystemOnePort
|
Judgment port. |
required |
mcp_types
|
Any
|
SDK type constructors. |
required |
params
|
Any
|
Tool call parameters. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
CallToolResult with structured content containing noul, model, usage. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If arguments are missing or answer is invalid. |
TypeError
|
If the answer has the wrong type. |
handle_ask_score(port, mcp_types, params)
async
Handle the ask_score tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
SystemOnePort
|
Judgment port. |
required |
mcp_types
|
Any
|
SDK type constructors. |
required |
params
|
Any
|
Tool call parameters. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
CallToolResult with structured content containing score, legend, |
Any
|
probabilities, confidence, model, usage. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If arguments are missing or answer is invalid. |
TypeError
|
If the answer has the wrong type. |