## resolve_metakernel()


The on-disk path of a tracked metakernel, from any form of reference.


Usage

``` python
resolve_metakernel(
    ref,
    mission=None,
)
```


Opens the database named in the config read-only, does one thing and closes it. For several operations in a row keep a [KernelDB](KernelDB.md#spice_kernel_db.KernelDB). This function calls [KernelDB.resolve_metakernel](KernelDB.resolve_metakernel.md#spice_kernel_db.KernelDB.resolve_metakernel).


## Parameters


`ref: str | Path`  
A path that exists, a registry filename, a registry `mk_path`, the `source_url` the metakernel was fetched from, or a version-stripped base name (`juice_crema_5_2.tm` for `juice_crema_5_2_v473_20260819_001.tm`). Names are case-insensitive, with or without `.tm`.

`mission: str | None = None`  
Narrow the registry to one mission (prefix match).


## Returns


`Path`  
The metakernel file on disk.


## Raises


`MetakernelNotTracked`  
Nothing matches, or the matched file is gone.

`AmbiguousMetakernel`  
Several registry rows match. The function never picks the first of several.
