pub struct HandlerDef {
pub name: &'static str,
pub description: &'static str,
pub visibility: Visibility,
pub category: VerbCategory,
pub params: &'static [ParamDef],
}Expand description
Handler metadata for discovery and documentation.
Replaces the previous VerbDef. Every entry carries a visibility tag
so the registry can separate the MCP-exposed surface from internal handlers,
and a category that classifies the illocutionary force of the verb
per the speech-act taxonomy.
The params slice is used by VerbRegistry::describe_verb to build the
help=true schema envelope. Packs that predate this field leave it empty
(&[]) which is backward-compatible — callers receive a schema envelope
with zero params rather than an error.
Fields§
§name: &'static str§description: &'static str§visibility: Visibility§category: VerbCategoryIllocutionary force classification. Use Assertive for Subhandler
entries that have no external callers.
params: &'static [ParamDef]Parameter schema for help=true introspection.
Empty (&[]) is the correct default for handlers that predate this
field or have no fixed parameter schema (e.g. free-form query verbs).
Implementations§
Source§impl HandlerDef
impl HandlerDef
Sourcepub fn presentation_policy(&self) -> VerbPresentationPolicy
pub fn presentation_policy(&self) -> VerbPresentationPolicy
Resolve the presentation policy for this handler.
Returns VerbPresentationPolicy::AlwaysVerbose for verbs whose
semantics demand full output (full UUIDs, complete timestamps) regardless
of the caller’s requested presentation mode.
Stream writers retain exact receipt timestamps while keeping other
Agent transforms. Unlisted verbs use Standard.