@macroforge/mcp-server
Version:
MCP server for Macroforge documentation and code analysis
56 lines (39 loc) • 1.35 kB
Markdown
## Attribute Options
### Name (Required)
The first argument is the macro name that users will reference in `@derive()`:
Rust
```
// Users write: @derive(JSON)
pub fn derive_json(...)
```
### Description
Provides documentation for the macro, shown by editors and in the macro manifest:
Rust
```
pub fn derive_json(...)
```
### Attributes
Declare which field-level decorators your macro accepts. Each can carry its own description, shown
when a user hovers the decorator:
Rust
```
pub fn derive_debug(...)
```
Note
Declared attributes become available as `@attributeName({ options })` decorators in TypeScript.
### Kind
`kind` is `"derive"` by default. [``](../../docs/custom-macros/ts-macro) and
[``](../../docs/custom-macros/ts-macro-attribute) set it to `"call"` and
`"attribute"` for you, so writing it out is rarely needed.