Module: Axn::Core::SchemaReflection

Defined in:
lib/axn/core/schema_reflection.rb

Overview

Public, transport-free schema export. Speaks input/output (the lingua franca of JSON Schema / OpenAPI / MCP / LLM function calling); the internal builder speaks inbound/outbound. Adapters wrap these Hashes into their transport objects.

Defined Under Namespace

Modules: InputSchemaMethod, OutputSchemaMethod

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

input_schema/output_schema are generic enough that an adapter base class (e.g. ::MCP::Tool) is likely to already define its own, transport-shaped versions. Layer axn's reflection reader on only when the name is free — otherwise extend would sit above that base class and silently shadow it (PRO-2875). Each name is guarded independently so a base class that owns only one still gets axn's reflection for the other.



16
17
18
19
# File 'lib/axn/core/schema_reflection.rb', line 16

def self.included(base)
  _extend_reflection(base, :input_schema, InputSchemaMethod)
  _extend_reflection(base, :output_schema, OutputSchemaMethod)
end