Class: Cerca::Models::HTTPToolDefinition

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cerca/models/http_tool_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(description:, endpoint:, input_schema:, name:, approval: nil, execution: nil, response: nil) ⇒ Object

Definition for a single HTTP tool exposed by a tool source.

Parameters:



# File 'lib/cerca/models/http_tool_definition.rb', line 47

Instance Attribute Details

#approvalSymbol, ...

Returns:



33
# File 'lib/cerca/models/http_tool_definition.rb', line 33

optional :approval, enum: -> { Cerca::ToolApprovalMode }

#descriptionString

Returns:

  • (String)


9
# File 'lib/cerca/models/http_tool_definition.rb', line 9

required :description, String

#endpointCerca::Models::HTTPEndpoint

HTTP endpoint invoked when the tool is called.



15
# File 'lib/cerca/models/http_tool_definition.rb', line 15

required :endpoint, -> { Cerca::HTTPEndpoint }

#executionCerca::Models::HTTPToolExecutionPolicy?

HTTP tool execution retry and timeout policy.



39
# File 'lib/cerca/models/http_tool_definition.rb', line 39

optional :execution, -> { Cerca::HTTPToolExecutionPolicy }

#input_schemaHash{Symbol=>Object}

JSON Schema object describing tool input parameters.

Returns:

  • (Hash{Symbol=>Object})


21
22
23
# File 'lib/cerca/models/http_tool_definition.rb', line 21

required :input_schema,
Cerca::Internal::Type::HashOf[Cerca::Internal::Type::Unknown],
api_name: :inputSchema

#nameString

Returns:

  • (String)


28
# File 'lib/cerca/models/http_tool_definition.rb', line 28

required :name, String

#responseCerca::Models::ResponseNormalizationHint?

How the HTTP response should be normalized for the agent.



45
# File 'lib/cerca/models/http_tool_definition.rb', line 45

optional :response, -> { Cerca::ResponseNormalizationHint }