Class: SchemaMetadataProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/mcp/tool.rb

Overview

Schema metadata processor for handling custom predicates in JSON schema output

Class Method Summary collapse

Class Method Details

.process(schema, collected_metadata = {}) ⇒ Object



172
173
174
175
176
177
178
179
180
181
182
# File 'lib/mcp/tool.rb', line 172

def self.process(schema,  = {})
  return nil unless schema

  base_schema = schema.json_schema.tap { _1.delete(:$schema) }
   = (schema)

  # Merge traditional metadata with collected nested metadata
   = (, )

  (base_schema, )
end