aeat.entrypoints.mcp._dispatch module¶
Map MCP tool calls to aeat CLI invocations.
Pure name and argv mapping: an MCP tool name round-trips to its registry command key, and a command key plus operator-supplied arguments project onto the CLI argv the server runs. The actual invocation lives in the server shell; this module is deterministic and unit-tested.
The live serving path builds its argv from the command’s per-verb input schema
via cli_argv_for() (named arguments in,
resolved CLI path out); tool_request_argv() remains the pure
(command_key, cli_tokens) -> argv mapper the determinism-replay eval uses to
reconstruct a recorded raw-token call.
- is_exposable_command(command_key)[source]¶
Return True when a registry command key should surface as an MCP tool.
- tool_name_for_command(command_key)[source]¶
Render a registry command key as a namespaced MCP tool name.
modelo.work.calculatebecomesaeat_modelo_work_calculate. Declared short forms shrink the few command keys that would otherwise overflow the client-prefixed name budget (P4), e.g.modelo.review_package.verify.signaturebecomesaeat_modelo_rpkg_verify_signature.
- prefixed_tool_name_length(command_key)[source]¶
Return the length of a command’s tool name including the client prefix.
- command_key_for_tool(tool_name, *, command_keys)[source]¶
Reverse a tool name to its registry command key.
Segment-internal underscores (
iva_wallet) make a naive_->.inverse ambiguous, so the reverse is resolved against the known command-key set: the unique key whose forward mapping equalstool_name.
- tool_request_argv(command_key, args)[source]¶
Build the CLI argv for a recorded raw-token tool call.
--format jsonis a root option (it precedes the command path), so the machine envelope is always requested. The pre-resolvedargstokens are appended after the command path. The live serving path instead builds its argv from the per-verb schema viacli_argv_for(); this mapper serves the determinism-replay eval, which records raw CLI-token calls.