Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentvolumes.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

A Command component packages a user-invokable action that fires when the user types a matching slash command in their agent runtime. Commands are explicitly user-initiated — the user types /review, /summarize, or another trigger pattern, and the runtime executes the associated command definition. This makes Commands distinct from Tools, which agents invoke programmatically.

Command vs. Tool

The most important distinction in Agent Volumes is between Commands (user-initiated) and Tools (agent-initiated):
CommandTool
Invoked byUser (explicitly)Agent (programmatically)
TriggerSlash command patternFunction call by agent
InputUser-provided contextStructured parameters
StatefulnessMay maintain workflow stateStateless per call
If you want the agent to be able to call a capability during its task loop, use a Tool. If you want a user to be able to trigger it by typing a command, use a Command.

Entrypoint format

Command entrypoints must be Markdown (.md) files with YAML frontmatter. The frontmatter must include a trigger field. The portable validation minimum requires:
  • The entrypoint file exists and is a Markdown file.
  • The frontmatter declares a trigger field.
  • The trigger value matches the regex ^\/[a-z0-9-]+$.

Required frontmatter

The trigger field is the only required frontmatter field for a command. It defines the slash command pattern users type to invoke it.
---
trigger: /review
---

Review the current pull request or diff. Summarize the changes, identify potential issues,
and suggest improvements with inline code examples where appropriate.
Valid trigger examples: /review, /summarize, /explain, /fix-types, /run-tests.
The trigger must match ^\/[a-z0-9-]+$ exactly. Uppercase letters, spaces, underscores, and special characters other than hyphens are not allowed. A command with an invalid trigger is a validation failure.

Declaring a command in volume.toml

Add a [[components]] entry with type = "command" and point entrypoint to your Markdown command file.
[[components]]
type = "command"
name = "review-pr"
entrypoint = "./commands/review-pr.md"
description = "Review the current pull request or diff"
A volume can bundle multiple commands alongside other component types:
[volume]
schema = 1
name = "dev-workflow-pack"
version = "2.0.0"
description = "Developer workflow commands for code review and documentation"
license = "MIT"
role = "plugin"

[publisher]
id = "example"

[[components]]
type = "command"
name = "review-pr"
entrypoint = "./commands/review-pr.md"
description = "Review the current pull request or diff"

[[components]]
type = "command"
name = "summarize-changes"
entrypoint = "./commands/summarize-changes.md"
description = "Summarize recent changes for a standup or release note"

[[components]]
type = "command"
name = "explain-code"
entrypoint = "./commands/explain-code.md"
description = "Explain the selected code or the current file"

Command entrypoint structure

A well-structured command file uses the frontmatter for the trigger and the Markdown body for instructions the runtime follows when the command fires:
---
trigger: /summarize
---

Summarize the content provided by the user. Follow these steps:

1. Identify the main topic and scope.
2. Extract three to five key points.
3. Write a concise summary paragraph of two to four sentences.
4. If the content is technical, include a plain-language explanation.

Keep the summary focused and avoid repeating information from the key points.

Validation requirements

A command entrypoint fails portable validation if any of these conditions are true:
  • The file does not exist or is not a regular Markdown file.
  • The frontmatter is missing or unparseable.
  • The trigger field is absent.
  • The trigger value does not match ^\/[a-z0-9-]+$.
Keep trigger names short and memorable. Users type them directly, so /review is better than /review-pull-request-and-suggest-changes.

Optional fields

FieldTypeDescription
descriptionstringOne-line description for registry search and tooling.
providersarray of stringsExternal services this command integrates with.
permissionstableComponent-specific permission overrides. Can only narrow volume-level values.

Component identifier

Once published, reference the command using a purl identifier:
pkg:volume/dev-workflow-pack@2.0.0#command/review-pr