Skip to main content
Glama
attribute-options.md809 B
## Attribute Options ### Name (Required) The first argument is the macro name that users will reference in `@derive()`: Rust ``` #[ts_macro_derive(JSON)]  // Users write: @derive(JSON) pub fn derive_json(...) ``` ### Description Provides documentation for the macro: Rust ``` #[ts_macro_derive(     JSON,     description = "Generates toJSON() returning a plain object" )] pub fn derive_json(...) ``` ### Attributes Declare which field-level decorators your macro accepts: Rust ``` #[ts_macro_derive(     Debug,     description = "Generates toString()",     attributes(debug)  // Allows @debug({ ... }) on fields )] pub fn derive_debug(...) ``` Note Declared attributes become available as `@attributeName({ options })` decorators in TypeScript.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/macroforge-ts/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server