---
title: Op
order: 5
description: "A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target)."
tags: [glossary, core-model]
---

# Op

A single tool-native command a target composes (long form: operation); the
middle of the work hierarchy (Spell to Op to Target).

## Example

A target calls a spell's op by name; this one runs the Go spell's `go-run`.

```buzz
go["go-run"](ctx, {"args": ["./cmd/tool"]});
```

## Used in

<!-- BEGIN GLOSSARY USAGE (generated by glossary-usage-generate from the knowledge graph; edit the generator, not this list) -->

In the docs:

- [Disambiguating "op" and "target"](../concepts/operations.md#disambiguating-op-and-target)
- [Secrets in a spell op](../concepts/secrets.md#secrets-in-a-spell-op)
- [A spell exports fun op(target: Target, req: Req) > Resp](../decisions/0011-typed-provider-calls.md#a-spell-exports-fun-optarget-target-req-req--resp)
- [Then a second op wanted the same grant](../recommendations.md#then-a-second-op-wanted-the-same-grant)
- [MGS1102: this review provider does not implement that op](../reference/codes/capability/MGS1102.md#mgs1102-this-review-provider-does-not-implement-that-op)
- [MGS1033: a cacheable target composes an op that reaches outside the tree](../reference/codes/magusfile/MGS1033.md#mgs1033-a-cacheable-target-composes-an-op-that-reaches-outside-the-tree)

In the code (`magus refs <name>` lists every site):

- `dry.Op` (Go)
- `spells.Op` (Go)
- `fsnotify.Op` (Go)

<!-- END GLOSSARY USAGE -->

## See also

- [Spell](spell.md)
- [Target](target.md)
- [Operations](../concepts/operations.md)
