THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
module documentation
Describe MCP response cache lifetime and visibility options.
| Class | |
Describe MCP response cache lifetime and visibility options. |
| Function | _metadata |
Merge response metadata while rejecting conflicting result values. |
| Function | buffered |
Measure buffered JSON data without counting builder-only ownership state. |
| Function | progress |
Enforce monotonic progress and retain the caller's correlation token. |
| Function | prompt |
Preserve role and individual content-block boundaries. |
| Function | resource |
Use only text/blob contents permitted by resources/read. |
| Function | response |
Accept explicit content responses and reject accidental arbitrary objects. |
| Async Function | tool |
Validate structured output before publishing a successful result. |
| Async Function | validated |
Normalize declared structured output before publishing its wire value. |
Merge response metadata while rejecting conflicting result values.
| Parameters | |
responses:tuple[orionis.mcp.McpResponse, ...] | Value supplied for responses. |
| Returns | |
dict[str, object] | Result of the operation described above. |
def progress_params(update:
Progress, token: str | int, previous: float) -> dict[ str, object]:
(source)
¶
Enforce monotonic progress and retain the caller's correlation token.
| Parameters | |
update:orionis.mcp.responses.Progress | Value supplied for update. |
token:str | int | Value supplied for token. |
previous:float | Value supplied for previous. |
| Returns | |
dict[str, object] | Result of the operation described above. |
def prompt_result(description:
str, responses: tuple[ McpResponse, ...]) -> GetPromptResult:
(source)
¶
Preserve role and individual content-block boundaries.
| Parameters | |
description:str | Value supplied for description. |
responses:tuple[orionis.mcp.McpResponse, ...] | Value supplied for responses. |
| Returns | |
orionis.mcp.protocol.results.GetPromptResult | Result of the operation described above. |
def resource_result(primitive:
CompiledPrimitive, request: McpRequest, responses: tuple[ McpResponse, ...], cache: CacheOptions) -> ReadResourceResult:
(source)
¶
Use only text/blob contents permitted by resources/read.
| Parameters | |
primitive:orionis.mcp.server.compiler.CompiledPrimitive | Compiled tool, resource or prompt declaration. |
request:orionis.mcp.McpRequest | Current request and its trusted execution context. |
responses:tuple[orionis.mcp.McpResponse, ...] | Value supplied for responses. |
cache:orionis.mcp.normalization.CacheOptions | Value supplied for cache. |
| Returns | |
orionis.mcp.protocol.results.ReadResourceResult | Result of the operation described above. |
Accept explicit content responses and reject accidental arbitrary objects.
| Parameters | |
result:object | Value supplied for result. |
| Returns | |
tuple[orionis.mcp.McpResponse, ...] | Result of the operation described above. |
async def tool_result(primitive:
CompiledPrimitive, responses: tuple[ McpResponse, ...]) -> CallToolResult:
(source)
¶
Validate structured output before publishing a successful result.
| Parameters | |
primitive:orionis.mcp.server.compiler.CompiledPrimitive | Compiled tool, resource or prompt declaration. |
responses:tuple[orionis.mcp.McpResponse, ...] | Value supplied for responses. |
| Returns | |
orionis.mcp.protocol.results.CallToolResult | Result of the operation described above. |
async def validated_output(primitive:
CompiledPrimitive, value: object) -> tuple[ object, str | None]:
(source)
¶
Normalize declared structured output before publishing its wire value.
| Parameters | |
primitive:orionis.mcp.server.compiler.CompiledPrimitive | Tool declaration supplying its output schema. |
value:object | Handler-provided structured content. |
| Returns | |
tuple[object, str | None] | Validated JSON value and its generated text, or unchanged undeclared output. |