Use a prompt when the client should ask your server for reusable prompt material instead of asking it to do the work. Prompts package instructions, context, and reusable prompt content. They do not execute the underlying task.Documentation Index
Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt
Use this file to discover all available pages before exploring further.
When a prompt is the right fit
Use a prompt when:- the client wants reusable prompt material
- named prompt arguments make sense
- the server should package content, not perform the action
Choose an argument model
Redop supports two ways to define prompt input:argumentsfor named string arguments and MCP prompt metadataargumentsSchemafor parsed and validated handler input
arguments when:
- callers only need named string inputs
- you want simple prompt metadata with
name,description, andrequired - you do not need coercion or schema validation
argumentsSchema when:
- input should be parsed before the handler runs
- you need validation beyond required string presence
- values should be coerced, such as string to number
Use arguments for named string inputs
When you register prompt arguments inline, Redop infers the handler arguments shape from that array. Required arguments become required string properties, and optional arguments stay optional.
Use argumentsSchema for parsed input
Use argumentsSchema when prompt arguments need parsing or validation beyond raw strings.
What happens when you define both
Defining botharguments and argumentsSchema does not throw by itself, but the two fields do different jobs.
argumentscontrols prompt metadata exposed to clientsargumentsalso drives the early missing-required-argument checkargumentsSchemacontrols prompt parsing and validationargumentsSchemaalso controls the handlerargumentstype
- metadata can mark a field optional while the schema still rejects missing input
- metadata can mark a field required while the schema allows omission
Handler
The prompthandler returns prompt content, not tool execution results.
It can return:
- an array of prompt messages
- an object shaped like
{ description?, messages }
What belongs in a good prompt
A good prompt usually has:- a stable name
- a clear description
- named arguments when callers need caller-supplied context
- prompt messages that are ready for the client to use
Local hooks and middleware
Prompts support per-prompt execution logic:beforeruns before middleware and the handlerafterruns after a successful result and may replace itafterResponseruns after the response is written and cannot replace itmiddlewarewraps only that prompt
afterResponse for non-critical work such as analytics or logging after the prompt response is already sent.
Prompt names and descriptions
Prompt names are programmatic identifiers exposed to MCP clients. Use stable names such ascode_review, summarise, or docs/rewrite.
Descriptions should explain what the prompt helps the client produce. Prefer short task-oriented phrasing.
Prompts vs tools
Choose a prompt when the server is packaging instructions. Choose a tool when the server is doing the work. For example:review_codeas a tool means the server performs review logiccode_reviewas a prompt means the server returns prompt material for a model or client to use