Skip to main content

Module alias_run

Module alias_run 

Source
Expand description

Top-level orchestration for alias_run — single entry point exposed for both the MCP tool handler and direct SDK consumers. Top-level orchestration for the alias_run MCP tool.

This module exposes [execute_alias_run] as the single entry point for running a named alias. Both the MCP tool handler and direct SDK consumers call this function; the MCP handler is a thin wrapper that:

  1. Resolves the [AliasRecord] from global or per-table storage.
  2. Calls [execute_alias_run].
  3. Serialises the [AliasRunValue] result to JSON (backward-compat shape).

§Crux compliance

  • Crux #1 / #2: crates/core/Cargo.toml must not declare rmcp as a dependency. All types here are pure Core-native types. MCP boundary conversions (e.g. MiniAppError → rmcp::ErrorData) are the sole responsibility of private adapter functions in crates/mcp.

§MiniJinja render pipeline (Crux §1/#2)

When record.params_schema is Some, the filter field is a MiniJinja template. The template is rendered with params as the context, then the rendered string is parsed as a [ListFilter] JSON document. When params_schema is None, the render step is skipped entirely for backward compatibility with plain-JSON aliases.

Enums§

AliasRunValue
The result of execute_alias_run.

Functions§

execute_alias_run
Execute an alias and return the typed result.