ORIONIS API REFERENCE

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.

class documentation

class McpResponse: (source)

View In Hierarchy

Compose protocol content without knowing the transport or DI container.

Class Method audio Encode raw audio bytes once.
Class Method error Return an application-visible tool error, with an explicit safe message.
Class Method image Encode raw image bytes once.
Class Method progress Yield progress; the dispatcher suppresses it without client opt-in.
Class Method resource Embed text or binary resource content at an explicit URI.
Class Method resourceLink Link to a resource without loading it.
Class Method structured Return any JSON value and the recommended serialized text content.
Class Method text Return text content.
Method asAssistant Assign the assistant role for a prompt response.
Method asUser Assign the user role for a prompt response.
Method withAnnotations Set audience, priority and modification hints on content blocks.
Method withContentMeta Attach application metadata to each content block.
Method withMeta Attach result metadata without allowing reserved protocol keys.
Class Variable content Undocumented
Class Variable is_error Undocumented
Class Variable meta Undocumented
Class Variable progress_update Undocumented
Class Variable role Undocumented
def audio(cls, value: bytes, mime_type: str) -> Self: (source)

Encode raw audio bytes once.

Parameters
value:bytesValue to inspect, transform or validate.
mime_type:strValue supplied for mime_type.
Returns
SelfResult of the operation described above.
def error(cls, message: str) -> Self: (source)

Return an application-visible tool error, with an explicit safe message.

Parameters
message:strValue supplied for message.
Returns
SelfAn application-visible tool error, with an explicit safe message.
def image(cls, value: bytes, mime_type: str) -> Self: (source)

Encode raw image bytes once.

Parameters
value:bytesValue to inspect, transform or validate.
mime_type:strValue supplied for mime_type.
Returns
SelfResult of the operation described above.
def progress(cls, current: float, total: float | None = None, message: str | None = None) -> Self: (source)

Yield progress; the dispatcher suppresses it without client opt-in.

Parameters
current:floatValue supplied for current.
total:float | NoneValue supplied for total.
message:str | NoneValue supplied for message.
Returns
SelfResult of the operation described above.
def resource(cls, uri: str, value: str | bytes, mime_type: str | None = None) -> Self: (source)

Embed text or binary resource content at an explicit URI.

Parameters
uri:strValue supplied for uri.
value:str | bytesValue to inspect, transform or validate.
mime_type:str | NoneValue supplied for mime_type.
Returns
SelfResult of the operation described above.
def resourceLink(cls, uri: str, name: str, *, title: str | None = None, description: str | None = None, mime_type: str | None = None) -> Self: (source)

Link to a resource without loading it.

Parameters
uri:strValue supplied for uri.
name:strValue supplied for name.
title:str | NoneValue supplied for title.
description:str | NoneValue supplied for description.
mime_type:str | NoneValue supplied for mime_type.
Returns
SelfResult of the operation described above.
def structured(cls, value: object) -> Self: (source)

Return any JSON value and the recommended serialized text content.

Parameters
value:objectValue to inspect, transform or validate.
Returns
SelfAny JSON value and the recommended serialized text content.
def text(cls, value: str) -> Self: (source)

Return text content.

Parameters
value:strValue to inspect, transform or validate.
Returns
SelfText content.
def asAssistant(self) -> Self: (source)

Assign the assistant role for a prompt response.

Returns
SelfResult of the operation described above.
def asUser(self) -> Self: (source)

Assign the user role for a prompt response.

Returns
SelfResult of the operation described above.
def withAnnotations(self, annotations: ContentAnnotations) -> Self: (source)

Set audience, priority and modification hints on content blocks.

Parameters
annotations:ContentAnnotationsValue supplied for annotations.
Returns
SelfResult of the operation described above.
def withContentMeta(self, metadata: dict[str, object]) -> Self: (source)

Attach application metadata to each content block.

Parameters
metadata:dict[str, object]Metadata associated with the current operation.
Returns
SelfResult of the operation described above.
def withMeta(self, metadata: dict[str, object]) -> Self: (source)

Attach result metadata without allowing reserved protocol keys.

Parameters
metadata:dict[str, object]Metadata associated with the current operation.
Returns
SelfResult of the operation described above.
content: tuple[ContentBlock, ...] = (source)

Undocumented

is_error: bool = (source)

Undocumented

Undocumented

progress_update: Progress | None = (source)

Undocumented

role: Literal['user', 'assistant'] = (source)

Undocumented