Class: McpToolkit::Resource::CustomFilter

Inherits:
Struct
  • Object
show all
Defined in:
lib/mcp_toolkit/resource.rb

Overview

A resource-specific ("custom") filter: a request-facing key whose value is applied to the relation by an arbitrary host-supplied block, rather than the generic equality/operator allowlist. The block is api-agnostic — it receives the already-scoped relation and the raw request value and returns a narrowed relation — so a host can express a relational or otherwise non-column filter (e.g. "only rows whose associated booking is in this rental") without the gem knowing anything about the query. type/description are surfaced by resource_schema so a client can discover the filter.

Instance Attribute Summary collapse

Instance Attribute Details

#applierObject

Returns the value of attribute applier

Returns:

  • (Object)

    the current value of applier



27
28
29
# File 'lib/mcp_toolkit/resource.rb', line 27

def applier
  @applier
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



27
28
29
# File 'lib/mcp_toolkit/resource.rb', line 27

def description
  @description
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



27
28
29
# File 'lib/mcp_toolkit/resource.rb', line 27

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



27
28
29
# File 'lib/mcp_toolkit/resource.rb', line 27

def type
  @type
end