meta

UDA attaching a descriptor-level _meta object to a @tool, @resource, or @resourceTemplate-annotated method (the MCP _meta field on Tool, Resource, ResourceTemplate). The supplied JSON must be an object; it is emitted verbatim as the descriptor's _meta.

@safe
struct meta {}

Members

Variables

value
Json value;

the _meta object (must be a JSON object to be emitted)

Examples

import vibe.data.json : parseJsonString;
@tool("x", "X")
@meta(parseJsonString(`{"category":"math"}`))
int x() { ... }