UseDocumentation 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.
inputSchema and outputSchema to define structured tool contracts in Redop.
What validation does in Redop
Redop uses schemas for two different jobs:inputSchemavalidates and parses tool input before the handler runsoutputSchemadescribes structured output to MCP clients
inputSchemaaffects runtime executionoutputSchemaaffects metadata andstructuredContentoutputSchemais not currently enforced against returned values at runtime
Basic example
What happens when validation fails
IfinputSchema validation fails:
- the handler does not run
- Redop wraps the message with the tool name
- the transport returns a tool error result with
isError: true
Supported schema styles
Redop auto-detects supported schema styles per schema value. You can mix supported schema libraries across tools, and even use a different supported library forinputSchema and outputSchema on the same tool.
Zod
Zod is a strong default when you want ergonomic authoring and good type inference.Standard Schema libraries
Redop supports libraries that implement the Standard Schema contract. That includes common options such as:- Zod
- Valibot
- ArkType
- Effect Schema
- Yup
- Joi
- other Standard Schema-compatible libraries
TypeBox
TypeBox is a good fit when you want JSON-Schema-first authoring and optional runtime validation through@sinclair/typebox/value.
Plain JSON Schema
You can also pass plain JSON Schema objects directly.- plain JSON Schema is used directly for MCP metadata
- plain JSON Schema does not currently perform runtime parsing or coercion by itself in Redop
Input schema vs output schema
UseinputSchema when you need:
- runtime validation
- type inference
- defaults or coercion from the schema library
- MCP input metadata
outputSchema when you need:
- structured output metadata for clients
structuredContenton object results- a machine-readable result shape
Practical rules
- use
inputSchemafor runtime input validation - use
outputSchemafor result metadata - prefer Zod or another Standard Schema library when you want runtime validation and strong types
- use TypeBox when you want JSON-Schema-first authoring
- use plain JSON Schema when you already have schema objects and only need metadata