Skip to main content

resolve_step

Function resolve_step 

Source
pub fn resolve_step(
    step: &ProcedureStep,
    requirements: &[McpRequirement],
    inventory: &McpInventory,
) -> Resolution
Expand description

Resolve a single procedure step against the agent’s MCP inventory.

Decision tree:

  1. tool set + intent unset → Literal(tool) (pre-M6b behaviour).
  2. tool_hint set + inventory match → Hint(tool).
  3. intent set + mcp_requirements glob matches an inventory tool → IntentMatch(shortest tool, capability).
  4. intent set + no glob match but fallback in inventory → Fallback(fallback).
  5. Otherwise → Unresolved { reason }.