victauri-macros
Proc macros for Victauri -- auto-instrumentation of Tauri commands for AI agent introspection.
The #[inspectable] Macro
Annotate any #[tauri::command] to make it discoverable by Victauri's MCP server.
The generated code refers to victauri_core::... by path, so the crate using the macro must
depend on victauri-core directly (whether you import the macro as
victauri_macros::inspectable or via the victauri_plugin::inspectable re-export) —
victauri init adds it for you:
[]
= "0.9"
= "0.9"
use inspectable;
async
This generates a companion function greet__schema() that returns a CommandInfo struct containing the command's name, parameters, and all metadata. Victauri's MCP tools use this for command discovery, natural language resolution, and ghost command detection.
Attributes
| Attribute | Required | Description |
|---|---|---|
description |
Yes | What the command does |
intent |
No | Natural language intent for NL-to-command resolution |
category |
No | Grouping label (e.g., "settings", "data", "ui") |
example |
No | Example usage phrase |
All code generation happens at compile time with zero runtime cost.
Documentation
Full API docs: docs.rs/victauri-macros
License
Apache-2.0 -- see LICENSE
Part of Victauri. Built by 4DA Systems.