McpOptions
Type, in @jr2/orchestrator/src/mcp-effect.ts. It is an export of @jr2/orchestrator, in the Effects group of the Authoring surface page.
type McpOptions<S extends z.ZodObject | undefined = undefined> = {
input?: S;
timeout?: Duration;
maxBody?: number;
idempotent?: boolean;
};The options of an mcp Effect.
Fields
input(optional):SThe zod schema of the input of the Effect: what the
inputof theinvoke, orfromPick, gives it. Formcp.callthe parsed input is the tool's arguments; formcp.prompt, the prompt's arguments, each a string. jr2 parses the input with it before the call. When it starts, input that does not agree with it makes the Effect fail (itsonErrorroute):mcp "<slot>": its input does not match the definition's input schema — <path>: <message>. With no schema, the input of theinvokeis the arguments as it is, and{}when it has none.timeout(optional):DurationHow long jr2 waits for the answer: a number and a unit, such as
"30s"or"2m". Default: the server'stimeoutinjr2.config.ts(60 seconds when it sets none). With no answer in that time, the output isunknown. It refuses a value that is not a positive duration:mcp: timeout "<timeout>" is not a positive duration (like "30s", "2m").maxBody(optional):numberThe largest number of bytes of
text, and ofstructuredas JSON, that the output keeps. Default 65536. Past it, jr2 cutstext, dropsstructured, and setstruncated. It refuses a value that is not a positive whole number:mcp({ maxBody }): a positive number of bytes.idempotent(optional):booleantruewhen it is safe to send the request two times: the tool only reads, or it has its own idempotency key. Defaultfalse. After an Orchestrator restart, jr2 cannot always tell if the request went out. Then it sends an idempotent one again, and gives any other the outputunknown. jr2 does not read the tool'sidempotentHint.