aeat.entrypoints.mcp._prompts module¶
Guided-workflow prompts: the user-controlled entry points of the console.
MCP prompts are the slash-command surface a client renders for the USER to
pick (ADR R4): invoking one drops the matching shipped skill — verbatim, as an
embedded resource — plus a short operating brief into the conversation, so the
model enters the workflow already carrying the playbook and its rules of
engagement. The catalogue is DERIVED from the shipped skill documents and
their structured applies_when metadata, never hand-listed, so a new skill
ships as a new prompt with zero registration and the surface cannot drift from
the data (aeat-registry-authority-flow discipline applied to the harness).
Like _tools and _dispatch, this module is SDK-independent pure
functions over typed models; _server adapts PromptDocument to the
MCP SDK’s prompt types, mirroring how build_sdk_tools adapts descriptors.
- exception PromptNotFoundError[source]¶
Bases:
LookupErrorRaised when a prompt name does not resolve to a shipped guided workflow.
- class PromptArgumentSpec(**data)[source]¶
Bases:
BaseModelOne declared argument a guided-workflow prompt accepts (ADR P5).
SDK-independent;
_serveradapts it to the MCPPromptArgumenttype. All workflow arguments are optional - a workflow can start without a period and resolve it conversationally - sorequireddefaults False.- name: str¶
- description: str¶
- required: bool¶
- class GuidedPrompt(**data)[source]¶
Bases:
BaseModelOne entry in the prompt catalogue (the
prompts/listrow).- Parameters:
- name: str¶
- title: str¶
- description: str¶
- skill_name: str¶
- arguments: tuple[PromptArgumentSpec, ...]¶
- class EmbeddedDocument(**data)[source]¶
Bases:
BaseModelA document embedded into the prompt’s returned messages as a resource.
- uri: str¶
- mime_type: str¶
- text: str¶
- class PromptDocument(**data)[source]¶
Bases:
BaseModelThe materialised
prompts/getpayload for one guided workflow.brief_textis the operating brief that precedes the embedded documents in the returned user message;embeddedcarries the skill (and, for the orientation prompt, the operator rules) verbatim so the client needs no follow-up resource read for the workflow to be fully loaded.- Parameters:
prompt (GuidedPrompt)
brief_text (str)
embedded (tuple[EmbeddedDocument, ...])
- prompt: GuidedPrompt¶
- brief_text: str¶
- embedded: tuple[EmbeddedDocument, ...]¶
- build_prompt_catalogue()[source]¶
Return the prompt catalogue: one guided workflow per shipped skill, plus orientation.
Sorted by name for deterministic
prompts/listoutput. Every skill’s frontmatter is validated on the way through (a malformed skill fails loudly here rather than shipping a broken prompt).- Return type:
- Returns:
A
GuidedPrompt.
- prompt_document(name, arguments=None)[source]¶
Materialise one guided workflow’s
prompts/getpayload.argumentsare the client-supplied prompt arguments (filing year, period); when present they are appended to the operating brief as an explicit scope so the model enters the workflow already knowing the period it targets.- Raises:
PromptNotFoundError – When
nameis neither the orientation prompt nor a shipped skill’s workflow.- Return type:
- Returns:
- Parameters: