Class: ScoutApmMcp::Server::FetchOpenAPISchemaTool

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/scout_apm_mcp/server/tools/fetch_openapi_schema_tool.rb

Instance Method Summary collapse

Instance Method Details

#call(validate: false, compare_with_local: false) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/scout_apm_mcp/server/tools/fetch_openapi_schema_tool.rb', line 11

def call(validate: false, compare_with_local: false)
  schema_data = get_client.fetch_openapi_schema
  result = base_result(schema_data)
  validate_schema_content(result, schema_data[:content]) if validate
  compare_with_local_schema(result, schema_data[:content]) if compare_with_local
  result[:content_preview] = schema_data[:content][0..500] if schema_data[:content]
  result
end