OzMcp.Structs.PromptArgument (OzMcp v0.9.0)

Copy Markdown View Source

Helper module used to build PromptArgument structure.

(MCP protocol: 2025-11-25)

Short example:

%PromptArgument{}
  |> PromptArgument.name("city")
  |> PromptArgument.description("The city name")
  |> PromptArgument.required(true)
  |> PromptArgument.build()

Result:

%{name: "city", description: "The city name", required: true}

Specification: PromptArgument

Fields

FieldSetterTypeRequired
namename/2stringyes
titletitle/2stringno
descriptiondescription/2stringno
requiredrequired/2booleanno

Summary

Types

t()

@type t() :: %OzMcp.Structs.PromptArgument{
  description: String.t() | nil,
  name: String.t(),
  required: boolean() | nil,
  title: String.t() | nil
}

Functions

build(struct)

@spec build(t()) :: map()

description(struct, value)

@spec description(t(), String.t() | nil) :: t()

name(struct, value)

@spec name(t(), String.t()) :: t()

required(struct, value)

@spec required(t(), boolean() | nil) :: t()

title(struct, value)

@spec title(t(), String.t() | nil) :: t()