Class: ActionModelContext::Prompt
- Inherits:
-
Object
- Object
- ActionModelContext::Prompt
- Includes:
- Primitive
- Defined in:
- lib/action_model_context/prompt.rb
Overview
Base class of the prompts. An application subclasses it through ApplicationPrompt, under app/mcp/prompts.
Instance Attribute Summary
Attributes included from Primitive
Class Method Summary collapse
-
.argument(name, required: false, title: nil, description: nil) ⇒ void
Declares an argument.
-
.prompt_name(name = nil) ⇒ String?
Declares the name, or reads it.
Instance Method Summary collapse
-
#call ⇒ String, Array<Hash>
Builds the prompt.
Methods included from Primitive
Class Method Details
.argument(name, required: false, title: nil, description: nil) ⇒ void
This method returns an undefined value.
Declares an argument. MCP gives a prompt argument no type, only these fields.
.prompt_name(name = nil) ⇒ String?
Declares the name, or reads it.
Instance Method Details
#call ⇒ String, Array<Hash>
Builds the prompt. A subclass defines it, with one keyword per argument it takes.