honeycomb-api 0.1.0__py3-none-any.whl → 0.5.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- honeycomb/__init__.py +9 -0
- honeycomb/_generated/api/auth/get_auth.py +2 -5
- honeycomb/_generated/api/auth/get_v2_auth.py +2 -5
- honeycomb/_generated/api/boards/create_board.py +6 -5
- honeycomb/_generated/api/boards/create_board_view.py +14 -9
- honeycomb/_generated/api/boards/delete_board.py +2 -5
- honeycomb/_generated/api/boards/delete_board_view.py +2 -5
- honeycomb/_generated/api/boards/get_board.py +2 -5
- honeycomb/_generated/api/boards/get_board_view.py +2 -5
- honeycomb/_generated/api/boards/list_board_views.py +10 -9
- honeycomb/_generated/api/boards/list_boards.py +2 -5
- honeycomb/_generated/api/boards/update_board.py +10 -5
- honeycomb/_generated/api/boards/update_board_view.py +2 -5
- honeycomb/_generated/api/burn_alerts/create_burn_alert.py +6 -8
- honeycomb/_generated/api/burn_alerts/delete_burn_alert.py +2 -5
- honeycomb/_generated/api/burn_alerts/get_burn_alert.py +2 -5
- honeycomb/_generated/api/burn_alerts/list_burn_alerts_by_slo.py +2 -5
- honeycomb/_generated/api/calculated_fields/create_calculated_field.py +2 -5
- honeycomb/_generated/api/calculated_fields/delete_calculated_field.py +2 -5
- honeycomb/_generated/api/calculated_fields/get_calculated_field.py +2 -5
- honeycomb/_generated/api/calculated_fields/list_calculated_fields.py +2 -8
- honeycomb/_generated/api/calculated_fields/update_calculated_field.py +2 -5
- honeycomb/_generated/api/columns/create_column.py +2 -5
- honeycomb/_generated/api/columns/delete_column.py +2 -5
- honeycomb/_generated/api/columns/get_column.py +2 -5
- honeycomb/_generated/api/columns/list_columns.py +2 -8
- honeycomb/_generated/api/columns/update_column.py +2 -5
- honeycomb/_generated/api/dataset_definitions/list_dataset_definitions.py +2 -5
- honeycomb/_generated/api/dataset_definitions/patch_dataset_definitions.py +2 -5
- honeycomb/_generated/api/datasets/create_dataset.py +2 -5
- honeycomb/_generated/api/datasets/delete_dataset.py +2 -5
- honeycomb/_generated/api/datasets/get_dataset.py +2 -5
- honeycomb/_generated/api/datasets/list_datasets.py +2 -5
- honeycomb/_generated/api/datasets/update_dataset.py +2 -5
- honeycomb/_generated/api/enhance/record_enhance_indexer_usage.py +4 -6
- honeycomb/_generated/api/environments/create_environment.py +2 -5
- honeycomb/_generated/api/environments/delete_environment.py +2 -5
- honeycomb/_generated/api/environments/get_environment.py +2 -5
- honeycomb/_generated/api/environments/list_environments.py +2 -7
- honeycomb/_generated/api/environments/update_environment.py +2 -5
- honeycomb/_generated/api/events/create_event.py +2 -7
- honeycomb/_generated/api/events/create_events.py +7 -11
- honeycomb/_generated/api/key_management/create_api_key.py +2 -5
- honeycomb/_generated/api/key_management/delete_api_key.py +2 -5
- honeycomb/_generated/api/key_management/get_api_key.py +2 -5
- honeycomb/_generated/api/key_management/list_api_keys.py +2 -7
- honeycomb/_generated/api/key_management/update_api_key.py +2 -5
- honeycomb/_generated/api/kinesis_events/create_kinesis_events.py +2 -5
- honeycomb/_generated/api/marker_settings/create_marker_setting.py +2 -5
- honeycomb/_generated/api/marker_settings/delete_marker_settings.py +2 -5
- honeycomb/_generated/api/marker_settings/list_marker_settings.py +2 -5
- honeycomb/_generated/api/marker_settings/update_marker_settings.py +2 -5
- honeycomb/_generated/api/markers/create_marker.py +2 -5
- honeycomb/_generated/api/markers/create_marker_v2.py +2 -5
- honeycomb/_generated/api/markers/delete_marker.py +2 -5
- honeycomb/_generated/api/markers/get_marker.py +2 -5
- honeycomb/_generated/api/markers/update_marker.py +2 -5
- honeycomb/_generated/api/markers/update_marker_v2.py +2 -5
- honeycomb/_generated/api/pipelines/get_pipeline_configuration.py +4 -8
- honeycomb/_generated/api/pipelines/record_pipeline_usage.py +4 -6
- honeycomb/_generated/api/pipelines/update_pipeline_configuration_rollout.py +6 -7
- honeycomb/_generated/api/queries/create_query.py +2 -5
- honeycomb/_generated/api/queries/get_query.py +2 -5
- honeycomb/_generated/api/query_annotations/create_query_annotation.py +2 -5
- honeycomb/_generated/api/query_annotations/delete_query_annotation.py +2 -5
- honeycomb/_generated/api/query_annotations/get_query_annotation.py +2 -5
- honeycomb/_generated/api/query_annotations/list_query_annotations.py +2 -7
- honeycomb/_generated/api/query_annotations/update_query_annotation.py +2 -5
- honeycomb/_generated/api/query_data/create_query_result.py +2 -5
- honeycomb/_generated/api/query_data/get_query_result.py +2 -5
- honeycomb/_generated/api/recipients/create_recipient.py +2 -6
- honeycomb/_generated/api/recipients/delete_recipient.py +2 -5
- honeycomb/_generated/api/recipients/get_recipient.py +2 -6
- honeycomb/_generated/api/recipients/list_recipients.py +2 -6
- honeycomb/_generated/api/recipients/update_recipient.py +2 -6
- honeycomb/_generated/api/reporting/get_slo_history.py +2 -5
- honeycomb/_generated/api/service_maps/create_map_dependency_request.py +6 -9
- honeycomb/_generated/api/service_maps/get_map_dependencies.py +2 -7
- honeycomb/_generated/api/sl_os/create_slo.py +2 -5
- honeycomb/_generated/api/sl_os/delete_slo.py +2 -5
- honeycomb/_generated/api/sl_os/get_slo.py +2 -8
- honeycomb/_generated/api/sl_os/list_slos.py +2 -5
- honeycomb/_generated/api/sl_os/update_slo.py +2 -5
- honeycomb/_generated/api/triggers/create_trigger.py +2 -6
- honeycomb/_generated/api/triggers/delete_trigger.py +2 -5
- honeycomb/_generated/api/triggers/get_trigger.py +2 -5
- honeycomb/_generated/api/triggers/list_triggers.py +2 -5
- honeycomb/_generated/api/triggers/list_triggers_with_recipient.py +2 -5
- honeycomb/_generated/api/triggers/update_trigger.py +2 -5
- honeycomb/_generated/client.py +2 -5
- honeycomb/_generated/models/__init__.py +195 -88
- honeycomb/_generated/models/api_key_create_request.py +6 -5
- honeycomb/_generated/models/api_key_create_request_data.py +15 -11
- honeycomb/_generated/models/api_key_create_request_data_relationships.py +2 -3
- honeycomb/_generated/models/api_key_create_request_data_type.py +1 -0
- honeycomb/_generated/models/api_key_list_response.py +2 -5
- honeycomb/_generated/models/api_key_object.py +14 -14
- honeycomb/_generated/models/api_key_object_links.py +2 -9
- honeycomb/_generated/models/api_key_object_relationships.py +5 -9
- honeycomb/_generated/models/api_key_object_type.py +1 -0
- honeycomb/_generated/models/api_key_response.py +2 -3
- honeycomb/_generated/models/api_key_update_request.py +15 -17
- honeycomb/_generated/models/auth.py +2 -5
- honeycomb/_generated/models/auth_api_key_access.py +2 -9
- honeycomb/_generated/models/auth_environment.py +2 -9
- honeycomb/_generated/models/auth_team.py +2 -9
- honeycomb/_generated/models/auth_type.py +1 -0
- honeycomb/_generated/models/auth_v2_response.py +5 -8
- honeycomb/_generated/models/auth_v2_response_data.py +14 -11
- honeycomb/_generated/models/auth_v2_response_data_attributes.py +10 -9
- honeycomb/_generated/models/auth_v2_response_data_attributes_key_type.py +1 -0
- honeycomb/_generated/models/auth_v2_response_data_attributes_timestamps.py +4 -12
- honeycomb/_generated/models/auth_v2_response_data_relationships.py +1 -7
- honeycomb/_generated/models/auth_v2_response_data_type.py +1 -0
- honeycomb/_generated/models/base_trigger.py +21 -18
- honeycomb/_generated/models/base_trigger_alert_type.py +1 -0
- honeycomb/_generated/models/base_trigger_baseline_details_type_0.py +5 -9
- honeycomb/_generated/models/base_trigger_baseline_details_type_0_offset_minutes.py +1 -0
- honeycomb/_generated/models/base_trigger_baseline_details_type_0_type.py +1 -0
- honeycomb/_generated/models/base_trigger_evaluation_schedule.py +8 -6
- honeycomb/_generated/models/base_trigger_evaluation_schedule_type.py +1 -0
- honeycomb/_generated/models/base_trigger_evaluation_schedule_window.py +4 -9
- honeycomb/_generated/models/base_trigger_evaluation_schedule_window_days_of_week_item.py +1 -0
- honeycomb/_generated/models/base_trigger_threshold.py +2 -9
- honeycomb/_generated/models/base_trigger_threshold_op.py +1 -0
- honeycomb/_generated/models/batch_event.py +2 -5
- honeycomb/_generated/models/board.py +15 -17
- honeycomb/_generated/models/board_layout_generation.py +1 -0
- honeycomb/_generated/models/board_links.py +2 -9
- honeycomb/_generated/models/board_panel_position.py +2 -9
- honeycomb/_generated/models/board_query_visualization_settings.py +8 -8
- honeycomb/_generated/models/board_query_visualization_settings_charts_item.py +4 -10
- honeycomb/_generated/models/board_query_visualization_settings_charts_item_chart_type.py +1 -0
- honeycomb/_generated/models/board_type.py +1 -0
- honeycomb/_generated/models/board_view_filter.py +2 -9
- honeycomb/_generated/models/board_view_filter_operation.py +1 -0
- honeycomb/_generated/models/board_view_response.py +2 -5
- honeycomb/_generated/models/budget_rate.py +4 -12
- honeycomb/_generated/models/budget_rate_alert_type.py +1 -0
- honeycomb/_generated/models/burn_alert_shared_params.py +4 -12
- honeycomb/_generated/models/calculated_field.py +2 -9
- honeycomb/_generated/models/configuration_key_attributes.py +16 -12
- honeycomb/_generated/models/configuration_key_attributes_key_type.py +1 -0
- honeycomb/_generated/models/configuration_key_attributes_permissions.py +172 -0
- honeycomb/_generated/models/configuration_key_attributes_timestamps.py +4 -12
- honeycomb/_generated/models/configuration_key_request.py +101 -0
- honeycomb/_generated/models/configuration_key_request_attributes.py +107 -0
- honeycomb/_generated/models/configuration_key_request_attributes_permissions.py +168 -0
- honeycomb/_generated/models/configuration_key_request_type.py +8 -0
- honeycomb/_generated/models/create_board_view_request.py +2 -3
- honeycomb/_generated/models/create_budget_rate_burn_alert_request.py +10 -10
- honeycomb/_generated/models/create_budget_rate_burn_alert_request_slo.py +1 -7
- honeycomb/_generated/models/create_column.py +2 -9
- honeycomb/_generated/models/create_column_type.py +1 -0
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data.py +10 -7
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes.py +8 -8
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item.py +8 -8
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum.py +10 -7
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_aggregation_temporality.py +1 -0
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item_attributes_item.py +8 -6
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item_attributes_item_value.py +2 -9
- honeycomb/_generated/models/create_enhance_indexer_usage_record_request_data_type.py +1 -0
- honeycomb/_generated/models/create_environment_request.py +8 -6
- honeycomb/_generated/models/create_environment_request_data.py +10 -7
- honeycomb/_generated/models/create_environment_request_data_attributes.py +2 -9
- honeycomb/_generated/models/create_environment_request_data_type.py +1 -0
- honeycomb/_generated/models/create_events_content_encoding.py +1 -0
- honeycomb/_generated/models/create_events_response_200_item.py +2 -9
- honeycomb/_generated/models/create_exhaustion_time_burn_alert_request.py +10 -10
- honeycomb/_generated/models/create_exhaustion_time_burn_alert_request_slo.py +1 -7
- honeycomb/_generated/models/create_map_dependencies_request.py +2 -5
- honeycomb/_generated/models/create_map_dependencies_response.py +4 -10
- honeycomb/_generated/models/create_map_dependencies_response_status.py +1 -0
- honeycomb/_generated/models/create_pipeline_health_record_request.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data.py +10 -7
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes.py +8 -8
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item.py +8 -8
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum.py +10 -7
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_aggregation_temporality.py +1 -0
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item_attributes_item.py +8 -6
- honeycomb/_generated/models/create_pipeline_health_record_request_data_attributes_usage_data_resource_metrics_item_scope_metrics_item_metrics_item_sum_datapoints_item_attributes_item_value.py +2 -9
- honeycomb/_generated/models/create_pipeline_health_record_request_data_type.py +1 -0
- honeycomb/_generated/models/create_query_result_request.py +2 -9
- honeycomb/_generated/models/dataset.py +2 -6
- honeycomb/_generated/models/dataset_creation_payload.py +2 -9
- honeycomb/_generated/models/dataset_definition_type_1.py +4 -10
- honeycomb/_generated/models/dataset_definition_type_1_column_type.py +1 -0
- honeycomb/_generated/models/dataset_definitions.py +2 -6
- honeycomb/_generated/models/dataset_relationship.py +2 -3
- honeycomb/_generated/models/dataset_relationship_data.py +2 -8
- honeycomb/_generated/models/dataset_relationship_data_type.py +1 -0
- honeycomb/_generated/models/dataset_settings.py +2 -9
- honeycomb/_generated/models/dataset_update_payload.py +8 -8
- honeycomb/_generated/models/dataset_update_payload_settings.py +2 -9
- honeycomb/_generated/models/detailed_error.py +2 -9
- honeycomb/_generated/models/email_recipient.py +4 -7
- honeycomb/_generated/models/email_recipient_details.py +1 -7
- honeycomb/_generated/models/email_recipient_type.py +1 -0
- honeycomb/_generated/models/environment.py +6 -7
- honeycomb/_generated/models/environment_attributes.py +11 -9
- honeycomb/_generated/models/environment_attributes_color_type_1.py +1 -0
- honeycomb/_generated/models/environment_attributes_settings.py +1 -7
- honeycomb/_generated/models/environment_color.py +1 -0
- honeycomb/_generated/models/environment_links.py +1 -7
- honeycomb/_generated/models/environment_list_response.py +2 -5
- honeycomb/_generated/models/environment_relationship.py +8 -6
- honeycomb/_generated/models/environment_relationship_data.py +3 -8
- honeycomb/_generated/models/environment_relationship_data_type.py +1 -0
- honeycomb/_generated/models/environment_response.py +2 -3
- honeycomb/_generated/models/environment_type.py +1 -0
- honeycomb/_generated/models/error.py +2 -9
- honeycomb/_generated/models/event.py +2 -8
- honeycomb/_generated/models/exhaustion_time.py +4 -12
- honeycomb/_generated/models/exhaustion_time_alert_type.py +1 -0
- honeycomb/_generated/models/exhaustion_time_burn_alert_list_response.py +10 -10
- honeycomb/_generated/models/exhaustion_time_burn_alert_list_response_slo.py +2 -9
- honeycomb/_generated/models/filter_op.py +1 -0
- honeycomb/_generated/models/get_map_dependencies_response.py +7 -10
- honeycomb/_generated/models/get_map_dependencies_response_status.py +1 -0
- honeycomb/_generated/models/having_calculate_op.py +1 -0
- honeycomb/_generated/models/having_op.py +1 -0
- honeycomb/_generated/models/included_resource.py +6 -7
- honeycomb/_generated/models/included_resource_attributes.py +1 -7
- honeycomb/_generated/models/ingest_key_attributes.py +14 -11
- honeycomb/_generated/models/ingest_key_attributes_key_type.py +1 -0
- honeycomb/_generated/models/ingest_key_attributes_permissions.py +2 -9
- honeycomb/_generated/models/ingest_key_attributes_timestamps.py +4 -12
- honeycomb/_generated/models/ingest_key_request.py +100 -0
- honeycomb/_generated/models/ingest_key_request_attributes.py +75 -0
- honeycomb/_generated/models/ingest_key_request_type.py +8 -0
- honeycomb/_generated/models/ingest_key_type.py +2 -9
- honeycomb/_generated/models/ingest_key_type_key_type.py +1 -0
- honeycomb/_generated/models/jsonapi_error_source.py +2 -9
- honeycomb/_generated/models/kinesis_event.py +2 -5
- honeycomb/_generated/models/kinesis_event_record.py +2 -9
- honeycomb/_generated/models/kinesis_response.py +2 -9
- honeycomb/_generated/models/list_api_keys_filtertype.py +1 -0
- honeycomb/_generated/models/map_dependency.py +2 -5
- honeycomb/_generated/models/map_node.py +2 -9
- honeycomb/_generated/models/map_node_type.py +1 -0
- honeycomb/_generated/models/marker.py +2 -9
- honeycomb/_generated/models/marker_create_request.py +2 -3
- honeycomb/_generated/models/marker_create_request_data.py +16 -10
- honeycomb/_generated/models/marker_create_request_data_attributes.py +2 -9
- honeycomb/_generated/models/marker_create_request_data_relationships.py +2 -3
- honeycomb/_generated/models/marker_create_request_data_type.py +1 -0
- honeycomb/_generated/models/marker_object.py +7 -8
- honeycomb/_generated/models/marker_object_attributes.py +8 -8
- honeycomb/_generated/models/marker_object_attributes_timestamps.py +4 -12
- honeycomb/_generated/models/marker_object_links.py +2 -9
- honeycomb/_generated/models/marker_object_relationships.py +8 -8
- honeycomb/_generated/models/marker_object_relationships_dataset.py +8 -9
- honeycomb/_generated/models/marker_object_relationships_dataset_data_type_0.py +4 -10
- honeycomb/_generated/models/marker_object_relationships_dataset_data_type_0_type.py +1 -0
- honeycomb/_generated/models/marker_object_type.py +1 -0
- honeycomb/_generated/models/marker_response.py +2 -3
- honeycomb/_generated/models/marker_setting.py +2 -10
- honeycomb/_generated/models/marker_update_request.py +2 -3
- honeycomb/_generated/models/marker_update_request_data.py +16 -10
- honeycomb/_generated/models/marker_update_request_data_attributes.py +2 -9
- honeycomb/_generated/models/marker_update_request_data_relationships.py +2 -3
- honeycomb/_generated/models/marker_update_request_data_type.py +1 -0
- honeycomb/_generated/models/ms_teams_recipient.py +4 -7
- honeycomb/_generated/models/ms_teams_recipient_details.py +1 -7
- honeycomb/_generated/models/ms_teams_recipient_type.py +1 -0
- honeycomb/_generated/models/ms_teams_workflow_recipient.py +12 -11
- honeycomb/_generated/models/ms_teams_workflow_recipient_details.py +1 -7
- honeycomb/_generated/models/ms_teams_workflow_recipient_type.py +1 -0
- honeycomb/_generated/models/notification_recipient.py +8 -8
- honeycomb/_generated/models/notification_recipient_details.py +10 -9
- honeycomb/_generated/models/notification_recipient_details_pagerduty_severity.py +1 -0
- honeycomb/_generated/models/notification_recipient_details_variables_item.py +2 -9
- honeycomb/_generated/models/pager_duty_recipient.py +8 -9
- honeycomb/_generated/models/pager_duty_recipient_details.py +1 -7
- honeycomb/_generated/models/pager_duty_recipient_type.py +1 -0
- honeycomb/_generated/models/pagination_links.py +2 -8
- honeycomb/_generated/models/payload_template.py +2 -9
- honeycomb/_generated/models/pipeline_configuration_response.py +16 -10
- honeycomb/_generated/models/pipeline_configuration_response_attributes.py +8 -8
- honeycomb/_generated/models/pipeline_configuration_response_attributes_configs_item.py +1 -7
- honeycomb/_generated/models/pipeline_configuration_response_links.py +2 -9
- honeycomb/_generated/models/pipeline_configuration_response_type.py +1 -0
- honeycomb/_generated/models/pipeline_configuration_rollout.py +16 -10
- honeycomb/_generated/models/pipeline_configuration_rollout_attributes.py +3 -8
- honeycomb/_generated/models/pipeline_configuration_rollout_attributes_status.py +1 -0
- honeycomb/_generated/models/pipeline_configuration_rollout_links.py +2 -9
- honeycomb/_generated/models/pipeline_configuration_rollout_type.py +1 -0
- honeycomb/_generated/models/preset_filter.py +1 -7
- honeycomb/_generated/models/query.py +11 -11
- honeycomb/_generated/models/query_annotation.py +4 -12
- honeycomb/_generated/models/query_annotation_source.py +1 -0
- honeycomb/_generated/models/query_calculated_fields_item.py +1 -7
- honeycomb/_generated/models/query_calculations_item.py +2 -10
- honeycomb/_generated/models/query_compare_time_offset_seconds.py +1 -0
- honeycomb/_generated/models/query_filter_combination.py +1 -0
- honeycomb/_generated/models/query_filters_item.py +2 -11
- honeycomb/_generated/models/query_havings_item.py +2 -10
- honeycomb/_generated/models/query_op.py +1 -0
- honeycomb/_generated/models/query_orders_item.py +2 -9
- honeycomb/_generated/models/query_orders_item_order.py +1 -0
- honeycomb/_generated/models/query_panel.py +2 -6
- honeycomb/_generated/models/query_panel_query_panel.py +10 -9
- honeycomb/_generated/models/query_panel_query_panel_query_style.py +1 -0
- honeycomb/_generated/models/query_result.py +2 -5
- honeycomb/_generated/models/query_result_details.py +5 -8
- honeycomb/_generated/models/query_result_details_data.py +5 -8
- honeycomb/_generated/models/query_result_details_links.py +2 -9
- honeycomb/_generated/models/query_result_links.py +2 -9
- honeycomb/_generated/models/query_results_data.py +2 -5
- honeycomb/_generated/models/query_results_data_data.py +2 -8
- honeycomb/_generated/models/query_results_series.py +2 -5
- honeycomb/_generated/models/recipient_properties.py +4 -12
- honeycomb/_generated/models/recipient_type.py +1 -0
- honeycomb/_generated/models/slack_recipient.py +4 -7
- honeycomb/_generated/models/slack_recipient_details.py +1 -7
- honeycomb/_generated/models/slack_recipient_type.py +1 -0
- honeycomb/_generated/models/slo.py +4 -8
- honeycomb/_generated/models/slo_create.py +4 -8
- honeycomb/_generated/models/slo_create_sli.py +1 -7
- honeycomb/_generated/models/slo_detailed_response.py +4 -8
- honeycomb/_generated/models/slo_detailed_response_status.py +1 -0
- honeycomb/_generated/models/slo_history.py +2 -9
- honeycomb/_generated/models/slo_history_request.py +2 -8
- honeycomb/_generated/models/slo_history_response.py +2 -3
- honeycomb/_generated/models/slo_panel.py +2 -6
- honeycomb/_generated/models/slo_panel_slo_panel.py +2 -9
- honeycomb/_generated/models/slo_sli.py +1 -7
- honeycomb/_generated/models/tag.py +1 -7
- honeycomb/_generated/models/team_relationship.py +2 -3
- honeycomb/_generated/models/team_relationship_team.py +6 -5
- honeycomb/_generated/models/team_relationship_team_data.py +3 -8
- honeycomb/_generated/models/team_relationship_team_data_type.py +1 -0
- honeycomb/_generated/models/template_variable_definition.py +2 -9
- honeycomb/_generated/models/text_panel.py +2 -6
- honeycomb/_generated/models/text_panel_text_panel.py +1 -7
- honeycomb/_generated/models/trigger_response.py +27 -21
- honeycomb/_generated/models/trigger_with_inline_query.py +27 -21
- honeycomb/_generated/models/trigger_with_inline_query_query.py +1 -7
- honeycomb/_generated/models/trigger_with_query_reference.py +21 -18
- honeycomb/_generated/models/update_board_view_request.py +2 -5
- honeycomb/_generated/models/update_environment_request.py +8 -6
- honeycomb/_generated/models/update_environment_request_data.py +10 -7
- honeycomb/_generated/models/update_environment_request_data_attributes.py +8 -8
- honeycomb/_generated/models/update_environment_request_data_attributes_settings.py +2 -9
- honeycomb/_generated/models/update_environment_request_data_type.py +1 -0
- honeycomb/_generated/models/update_exhaustion_time_burn_alert_request.py +4 -7
- honeycomb/_generated/models/update_pipeline_configuration_rollout.py +10 -7
- honeycomb/_generated/models/update_pipeline_configuration_rollout_attributes.py +3 -8
- honeycomb/_generated/models/update_pipeline_configuration_rollout_attributes_status.py +1 -0
- honeycomb/_generated/models/update_pipeline_configuration_rollout_request.py +8 -6
- honeycomb/_generated/models/update_pipeline_configuration_rollout_request_data.py +10 -7
- honeycomb/_generated/models/update_pipeline_configuration_rollout_request_data_attributes.py +3 -8
- honeycomb/_generated/models/update_pipeline_configuration_rollout_request_data_attributes_status.py +1 -0
- honeycomb/_generated/models/update_pipeline_configuration_rollout_request_data_type.py +1 -0
- honeycomb/_generated/models/update_pipeline_configuration_rollout_response.py +8 -6
- honeycomb/_generated/models/update_pipeline_configuration_rollout_type.py +1 -0
- honeycomb/_generated/models/user_relationship.py +2 -3
- honeycomb/_generated/models/user_relationship_data.py +2 -8
- honeycomb/_generated/models/user_relationship_data_type.py +1 -0
- honeycomb/_generated/models/validation_error.py +8 -8
- honeycomb/_generated/models/validation_error_type_detail_item.py +4 -10
- honeycomb/_generated/models/validation_error_type_detail_item_code.py +1 -0
- honeycomb/_generated/models/webhook_header.py +2 -9
- honeycomb/_generated/models/webhook_recipient.py +4 -7
- honeycomb/_generated/models/webhook_recipient_details.py +8 -8
- honeycomb/_generated/models/webhook_recipient_details_webhook_payloads.py +12 -10
- honeycomb/_generated/models/webhook_recipient_details_webhook_payloads_payload_templates.py +2 -5
- honeycomb/_generated/models/webhook_recipient_type.py +1 -0
- honeycomb/_generated/types.py +1 -1
- honeycomb/cli/__init__.py +85 -0
- honeycomb/cli/api_keys.py +205 -0
- honeycomb/cli/auth.py +70 -0
- honeycomb/cli/boards.py +203 -0
- honeycomb/cli/columns.py +256 -0
- honeycomb/cli/config.py +259 -0
- honeycomb/cli/datasets.py +186 -0
- honeycomb/cli/derived_columns.py +222 -0
- honeycomb/cli/environments.py +240 -0
- honeycomb/cli/formatters.py +242 -0
- honeycomb/cli/markers.py +151 -0
- honeycomb/cli/queries.py +380 -0
- honeycomb/cli/recipients.py +211 -0
- honeycomb/cli/slos.py +338 -0
- honeycomb/cli/triggers.py +271 -0
- honeycomb/client.py +13 -7
- honeycomb/models/__init__.py +18 -3
- honeycomb/models/api_keys.py +49 -5
- honeycomb/models/auth.py +71 -0
- honeycomb/models/board_builder.py +97 -25
- honeycomb/models/boards.py +95 -1
- honeycomb/models/datasets.py +42 -0
- honeycomb/models/queries.py +21 -0
- honeycomb/models/query_builder.py +119 -59
- honeycomb/models/recipient_builder.py +51 -4
- honeycomb/models/slo_builder.py +24 -19
- honeycomb/models/slos.py +50 -3
- honeycomb/models/tool_inputs.py +630 -0
- honeycomb/models/triggers.py +39 -9
- honeycomb/resources/__init__.py +2 -0
- honeycomb/resources/api_keys.py +66 -29
- honeycomb/resources/auth.py +97 -0
- honeycomb/resources/boards.py +272 -18
- honeycomb/resources/datasets.py +49 -11
- honeycomb/resources/environments.py +54 -31
- honeycomb/resources/slos.py +87 -61
- honeycomb/tools/__main__.py +40 -4
- honeycomb/tools/builders.py +235 -150
- honeycomb/tools/descriptions.py +175 -7
- honeycomb/tools/executor.py +212 -25
- honeycomb/tools/generator.py +61 -2264
- honeycomb/tools/resources/__init__.py +42 -0
- honeycomb/tools/resources/api_keys.py +249 -0
- honeycomb/tools/resources/auth.py +98 -0
- honeycomb/tools/resources/boards.py +313 -0
- honeycomb/tools/resources/burn_alerts.py +278 -0
- honeycomb/tools/resources/columns.py +257 -0
- honeycomb/tools/resources/datasets.py +215 -0
- honeycomb/tools/resources/derived_columns.py +311 -0
- honeycomb/tools/resources/environments.py +211 -0
- honeycomb/tools/resources/events.py +158 -0
- honeycomb/tools/resources/marker_settings.py +216 -0
- honeycomb/tools/resources/markers.py +197 -0
- honeycomb/tools/resources/queries.py +220 -0
- honeycomb/tools/resources/recipients.py +297 -0
- honeycomb/tools/resources/service_map.py +110 -0
- honeycomb/tools/resources/slos.py +276 -0
- honeycomb/tools/resources/triggers.py +328 -0
- honeycomb/tools/schemas.py +81 -0
- {honeycomb_api-0.1.0.dist-info → honeycomb_api-0.5.3.dist-info}/METADATA +33 -8
- honeycomb_api-0.5.3.dist-info/RECORD +497 -0
- honeycomb_api-0.5.3.dist-info/entry_points.txt +5 -0
- honeycomb_api-0.1.0.dist-info/RECORD +0 -453
- {honeycomb_api-0.1.0.dist-info → honeycomb_api-0.5.3.dist-info}/WHEEL +0 -0
- {honeycomb_api-0.1.0.dist-info → honeycomb_api-0.5.3.dist-info}/licenses/LICENSE +0 -0
honeycomb/tools/generator.py
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
"""Core tool definition generator for Claude API.
|
|
2
2
|
|
|
3
|
-
This module
|
|
3
|
+
This module aggregates tool definitions from resource-specific modules.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import json
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
|
-
from honeycomb.
|
|
10
|
-
BoardCreate,
|
|
11
|
-
BurnAlertCreate,
|
|
12
|
-
ColumnCreate,
|
|
13
|
-
DatasetCreate,
|
|
14
|
-
DerivedColumnCreate,
|
|
15
|
-
MarkerCreate,
|
|
16
|
-
MarkerSettingCreate,
|
|
17
|
-
QuerySpec,
|
|
18
|
-
RecipientCreate,
|
|
19
|
-
ServiceMapDependencyRequestCreate,
|
|
20
|
-
SLOCreate,
|
|
21
|
-
TriggerCreate,
|
|
22
|
-
)
|
|
23
|
-
from honeycomb.tools.descriptions import get_description, validate_description
|
|
24
|
-
from honeycomb.tools.schemas import (
|
|
25
|
-
add_parameter,
|
|
26
|
-
generate_schema_from_model,
|
|
27
|
-
validate_schema,
|
|
28
|
-
validate_tool_name,
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
# ==============================================================================
|
|
32
|
-
# Tool Definition Structure
|
|
33
|
-
# ==============================================================================
|
|
9
|
+
from honeycomb.tools import resources
|
|
34
10
|
|
|
35
11
|
|
|
12
|
+
# Re-export create_tool_definition for backwards compatibility
|
|
36
13
|
def create_tool_definition(
|
|
37
14
|
name: str,
|
|
38
15
|
description: str,
|
|
@@ -53,12 +30,14 @@ def create_tool_definition(
|
|
|
53
30
|
Raises:
|
|
54
31
|
ValueError: If validation fails
|
|
55
32
|
"""
|
|
56
|
-
|
|
33
|
+
from honeycomb.tools.descriptions import validate_description
|
|
34
|
+
from honeycomb.tools.schemas import add_metadata_fields, validate_schema, validate_tool_name
|
|
35
|
+
|
|
57
36
|
validate_tool_name(name)
|
|
58
37
|
validate_description(description)
|
|
59
38
|
validate_schema(input_schema)
|
|
39
|
+
add_metadata_fields(input_schema)
|
|
60
40
|
|
|
61
|
-
# Build definition
|
|
62
41
|
definition: dict[str, Any] = {
|
|
63
42
|
"name": name,
|
|
64
43
|
"description": description,
|
|
@@ -71,2133 +50,58 @@ def create_tool_definition(
|
|
|
71
50
|
return definition
|
|
72
51
|
|
|
73
52
|
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
""
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{"dataset": "production"},
|
|
94
|
-
]
|
|
95
|
-
|
|
96
|
-
return create_tool_definition(
|
|
97
|
-
name="honeycomb_list_triggers",
|
|
98
|
-
description=get_description("honeycomb_list_triggers"),
|
|
99
|
-
input_schema=schema,
|
|
100
|
-
input_examples=examples,
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def generate_get_trigger_tool() -> dict[str, Any]:
|
|
105
|
-
"""Generate honeycomb_get_trigger tool definition."""
|
|
106
|
-
schema: dict[str, Any] = {
|
|
107
|
-
"type": "object",
|
|
108
|
-
"properties": {},
|
|
109
|
-
"required": ["dataset", "trigger_id"],
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
113
|
-
add_parameter(schema, "trigger_id", "string", "The trigger ID to retrieve", required=True)
|
|
114
|
-
|
|
115
|
-
examples = [
|
|
116
|
-
{"dataset": "api-logs", "trigger_id": "aBcD123"},
|
|
117
|
-
{"dataset": "production", "trigger_id": "xyz789"},
|
|
118
|
-
]
|
|
119
|
-
|
|
120
|
-
return create_tool_definition(
|
|
121
|
-
name="honeycomb_get_trigger",
|
|
122
|
-
description=get_description("honeycomb_get_trigger"),
|
|
123
|
-
input_schema=schema,
|
|
124
|
-
input_examples=examples,
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def generate_create_trigger_tool() -> dict[str, Any]:
|
|
129
|
-
"""Generate honeycomb_create_trigger tool definition."""
|
|
130
|
-
# Start with TriggerCreate schema
|
|
131
|
-
base_schema = generate_schema_from_model(
|
|
132
|
-
TriggerCreate,
|
|
133
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
# Add dataset parameter
|
|
137
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
138
|
-
add_parameter(
|
|
139
|
-
schema, "dataset", "string", "The dataset slug to create the trigger in", required=True
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
# Merge with TriggerCreate schema
|
|
143
|
-
schema["properties"].update(base_schema["properties"])
|
|
144
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
145
|
-
|
|
146
|
-
# Add definitions if present
|
|
147
|
-
if "$defs" in base_schema:
|
|
148
|
-
schema["$defs"] = base_schema["$defs"]
|
|
149
|
-
|
|
150
|
-
examples = [
|
|
151
|
-
# Minimal example with COUNT
|
|
152
|
-
{
|
|
153
|
-
"dataset": "api-logs",
|
|
154
|
-
"name": "High Error Rate",
|
|
155
|
-
"query": {
|
|
156
|
-
"time_range": 900,
|
|
157
|
-
"calculations": [{"op": "COUNT"}],
|
|
158
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
159
|
-
},
|
|
160
|
-
"threshold": {"op": ">", "value": 100},
|
|
161
|
-
"frequency": 900,
|
|
162
|
-
},
|
|
163
|
-
# P99 latency with recipients
|
|
164
|
-
{
|
|
165
|
-
"dataset": "production",
|
|
166
|
-
"name": "P99 Latency Alert",
|
|
167
|
-
"description": "Alerts when P99 latency exceeds 2 seconds",
|
|
168
|
-
"query": {
|
|
169
|
-
"time_range": 3600,
|
|
170
|
-
"calculations": [{"op": "P99", "column": "duration_ms"}],
|
|
171
|
-
},
|
|
172
|
-
"threshold": {"op": ">=", "value": 2000},
|
|
173
|
-
"frequency": 3600,
|
|
174
|
-
"recipients": [{"type": "email", "target": "oncall@example.com"}],
|
|
175
|
-
"alert_type": "on_change",
|
|
176
|
-
},
|
|
177
|
-
# Advanced: Multiple filters with string operations and tags
|
|
178
|
-
{
|
|
179
|
-
"dataset": "api-logs",
|
|
180
|
-
"name": "API Gateway Errors",
|
|
181
|
-
"description": "Monitors error rates for specific service with path filtering",
|
|
182
|
-
"query": {
|
|
183
|
-
"time_range": 1800,
|
|
184
|
-
"calculations": [{"op": "COUNT"}],
|
|
185
|
-
"filters": [
|
|
186
|
-
{"column": "status_code", "op": ">=", "value": 500},
|
|
187
|
-
{"column": "service_name", "op": "=", "value": "api-gateway"},
|
|
188
|
-
{"column": "path", "op": "starts-with", "value": "/api/v2"},
|
|
189
|
-
],
|
|
190
|
-
"filter_combination": "AND",
|
|
191
|
-
"breakdowns": ["endpoint"],
|
|
192
|
-
},
|
|
193
|
-
"threshold": {"op": ">", "value": 50, "exceeded_limit": 2},
|
|
194
|
-
"frequency": 900,
|
|
195
|
-
"recipients": [
|
|
196
|
-
{"type": "slack", "target": "#alerts"},
|
|
197
|
-
{
|
|
198
|
-
"type": "pagerduty",
|
|
199
|
-
"target": "routing-key-123",
|
|
200
|
-
"details": {"severity": "critical"},
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
"tags": [
|
|
204
|
-
{"key": "team", "value": "platform"},
|
|
205
|
-
{"key": "severity", "value": "high"},
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
# HEATMAP calculation example
|
|
209
|
-
{
|
|
210
|
-
"dataset": "traces",
|
|
211
|
-
"name": "Request Duration Distribution",
|
|
212
|
-
"query": {
|
|
213
|
-
"time_range": 3600,
|
|
214
|
-
"calculations": [{"op": "HEATMAP", "column": "duration_ms"}],
|
|
215
|
-
},
|
|
216
|
-
"threshold": {"op": ">", "value": 1000},
|
|
217
|
-
"frequency": 3600,
|
|
218
|
-
},
|
|
219
|
-
# COUNT_DISTINCT example
|
|
220
|
-
{
|
|
221
|
-
"dataset": "api-logs",
|
|
222
|
-
"name": "Unique Error Messages",
|
|
223
|
-
"query": {
|
|
224
|
-
"time_range": 3600,
|
|
225
|
-
"calculations": [{"op": "COUNT_DISTINCT", "column": "error_message"}],
|
|
226
|
-
"filters": [{"column": "level", "op": "=", "value": "error"}],
|
|
227
|
-
},
|
|
228
|
-
"threshold": {"op": ">", "value": 10},
|
|
229
|
-
"frequency": 1800,
|
|
230
|
-
},
|
|
231
|
-
]
|
|
232
|
-
|
|
233
|
-
return create_tool_definition(
|
|
234
|
-
name="honeycomb_create_trigger",
|
|
235
|
-
description=get_description("honeycomb_create_trigger"),
|
|
236
|
-
input_schema=schema,
|
|
237
|
-
input_examples=examples,
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
def generate_update_trigger_tool() -> dict[str, Any]:
|
|
242
|
-
"""Generate honeycomb_update_trigger tool definition."""
|
|
243
|
-
base_schema = generate_schema_from_model(
|
|
244
|
-
TriggerCreate,
|
|
245
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
schema: dict[str, Any] = {
|
|
249
|
-
"type": "object",
|
|
250
|
-
"properties": {},
|
|
251
|
-
"required": ["dataset", "trigger_id"],
|
|
252
|
-
}
|
|
253
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
254
|
-
add_parameter(schema, "trigger_id", "string", "The trigger ID to update", required=True)
|
|
255
|
-
|
|
256
|
-
schema["properties"].update(base_schema["properties"])
|
|
257
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
258
|
-
|
|
259
|
-
if "$defs" in base_schema:
|
|
260
|
-
schema["$defs"] = base_schema["$defs"]
|
|
261
|
-
|
|
262
|
-
examples = [
|
|
263
|
-
{
|
|
264
|
-
"dataset": "api-logs",
|
|
265
|
-
"trigger_id": "abc123",
|
|
266
|
-
"name": "Updated High Error Rate",
|
|
267
|
-
"query": {
|
|
268
|
-
"time_range": 900,
|
|
269
|
-
"calculations": [{"op": "COUNT"}],
|
|
270
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
271
|
-
},
|
|
272
|
-
"threshold": {"op": ">", "value": 150}, # Updated threshold
|
|
273
|
-
"frequency": 900,
|
|
274
|
-
},
|
|
275
|
-
]
|
|
276
|
-
|
|
277
|
-
return create_tool_definition(
|
|
278
|
-
name="honeycomb_update_trigger",
|
|
279
|
-
description=get_description("honeycomb_update_trigger"),
|
|
280
|
-
input_schema=schema,
|
|
281
|
-
input_examples=examples,
|
|
282
|
-
)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
def generate_delete_trigger_tool() -> dict[str, Any]:
|
|
286
|
-
"""Generate honeycomb_delete_trigger tool definition."""
|
|
287
|
-
schema: dict[str, Any] = {
|
|
288
|
-
"type": "object",
|
|
289
|
-
"properties": {},
|
|
290
|
-
"required": ["dataset", "trigger_id"],
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
294
|
-
add_parameter(schema, "trigger_id", "string", "The trigger ID to delete", required=True)
|
|
295
|
-
|
|
296
|
-
examples = [
|
|
297
|
-
{"dataset": "api-logs", "trigger_id": "abc123"},
|
|
298
|
-
{"dataset": "production", "trigger_id": "xyz789"},
|
|
299
|
-
]
|
|
300
|
-
|
|
301
|
-
return create_tool_definition(
|
|
302
|
-
name="honeycomb_delete_trigger",
|
|
303
|
-
description=get_description("honeycomb_delete_trigger"),
|
|
304
|
-
input_schema=schema,
|
|
305
|
-
input_examples=examples,
|
|
306
|
-
)
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
# ==============================================================================
|
|
310
|
-
# SLOs Tool Definitions
|
|
311
|
-
# ==============================================================================
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
def generate_list_slos_tool() -> dict[str, Any]:
|
|
315
|
-
"""Generate honeycomb_list_slos tool definition."""
|
|
316
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
317
|
-
|
|
318
|
-
add_parameter(schema, "dataset", "string", "The dataset slug to list SLOs from", required=True)
|
|
319
|
-
|
|
320
|
-
examples = [
|
|
321
|
-
{"dataset": "api-logs"},
|
|
322
|
-
{"dataset": "production"},
|
|
323
|
-
]
|
|
324
|
-
|
|
325
|
-
return create_tool_definition(
|
|
326
|
-
name="honeycomb_list_slos",
|
|
327
|
-
description=get_description("honeycomb_list_slos"),
|
|
328
|
-
input_schema=schema,
|
|
329
|
-
input_examples=examples,
|
|
330
|
-
)
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
def generate_get_slo_tool() -> dict[str, Any]:
|
|
334
|
-
"""Generate honeycomb_get_slo tool definition."""
|
|
335
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "slo_id"]}
|
|
336
|
-
|
|
337
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
338
|
-
add_parameter(schema, "slo_id", "string", "The SLO ID to retrieve", required=True)
|
|
339
|
-
|
|
340
|
-
examples = [
|
|
341
|
-
{"dataset": "api-logs", "slo_id": "slo-123"},
|
|
342
|
-
{"dataset": "production", "slo_id": "slo-456"},
|
|
343
|
-
]
|
|
344
|
-
|
|
345
|
-
return create_tool_definition(
|
|
346
|
-
name="honeycomb_get_slo",
|
|
347
|
-
description=get_description("honeycomb_get_slo"),
|
|
348
|
-
input_schema=schema,
|
|
349
|
-
input_examples=examples,
|
|
350
|
-
)
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
def generate_create_slo_tool() -> dict[str, Any]:
|
|
354
|
-
"""Generate honeycomb_create_slo tool definition."""
|
|
355
|
-
base_schema = generate_schema_from_model(
|
|
356
|
-
SLOCreate,
|
|
357
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
358
|
-
)
|
|
359
|
-
|
|
360
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
361
|
-
add_parameter(
|
|
362
|
-
schema, "dataset", "string", "The dataset slug to create the SLO in", required=True
|
|
363
|
-
)
|
|
364
|
-
|
|
365
|
-
schema["properties"].update(base_schema["properties"])
|
|
366
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
367
|
-
|
|
368
|
-
if "$defs" in base_schema:
|
|
369
|
-
schema["$defs"] = base_schema["$defs"]
|
|
370
|
-
|
|
371
|
-
examples = [
|
|
372
|
-
# Minimal with existing derived column
|
|
373
|
-
{
|
|
374
|
-
"dataset": "api-logs",
|
|
375
|
-
"name": "API Availability",
|
|
376
|
-
"sli": {"alias": "success_rate"},
|
|
377
|
-
"target_per_million": 999000, # 99.9%
|
|
378
|
-
"time_period_days": 30,
|
|
379
|
-
},
|
|
380
|
-
# With NEW derived column created inline
|
|
381
|
-
{
|
|
382
|
-
"dataset": "production",
|
|
383
|
-
"name": "Request Success Rate",
|
|
384
|
-
"description": "Percentage of requests that succeed (status < 500)",
|
|
385
|
-
"sli": {
|
|
386
|
-
"alias": "request_success",
|
|
387
|
-
"expression": "IF(LT($status_code, 500), 1, 0)",
|
|
388
|
-
"description": "1 if status < 500, else 0",
|
|
389
|
-
},
|
|
390
|
-
"target_per_million": 995000, # 99.5%
|
|
391
|
-
"time_period_days": 7,
|
|
392
|
-
},
|
|
393
|
-
# With burn alerts inline (creates SLO + derived column + burn alerts in one call)
|
|
394
|
-
{
|
|
395
|
-
"dataset": "api-logs",
|
|
396
|
-
"name": "Critical API Availability",
|
|
397
|
-
"description": "High-priority SLO with burn rate alerting",
|
|
398
|
-
"sli": {
|
|
399
|
-
"alias": "api_success",
|
|
400
|
-
"expression": "IF(LT($status_code, 500), 1, 0)",
|
|
401
|
-
},
|
|
402
|
-
"target_per_million": 999900, # 99.99%
|
|
403
|
-
"time_period_days": 30,
|
|
404
|
-
"burn_alerts": [
|
|
405
|
-
{
|
|
406
|
-
"alert_type": "exhaustion_time",
|
|
407
|
-
"exhaustion_minutes": 60,
|
|
408
|
-
"description": "Budget exhausting in 1 hour",
|
|
409
|
-
"recipients": [
|
|
410
|
-
{"type": "email", "target": "oncall@example.com"},
|
|
411
|
-
{"type": "slack", "target": "#critical-alerts"},
|
|
412
|
-
],
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
"alert_type": "budget_rate",
|
|
416
|
-
"budget_rate_window_minutes": 60,
|
|
417
|
-
"budget_rate_decrease_threshold_per_million": 10000, # 1% drop in 1 hour
|
|
418
|
-
"description": "Error budget dropping too fast",
|
|
419
|
-
"recipients": [{"type": "pagerduty", "target": "routing-key-123"}],
|
|
420
|
-
},
|
|
421
|
-
],
|
|
422
|
-
},
|
|
423
|
-
]
|
|
424
|
-
|
|
425
|
-
return create_tool_definition(
|
|
426
|
-
name="honeycomb_create_slo",
|
|
427
|
-
description=get_description("honeycomb_create_slo"),
|
|
428
|
-
input_schema=schema,
|
|
429
|
-
input_examples=examples,
|
|
430
|
-
)
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
def generate_update_slo_tool() -> dict[str, Any]:
|
|
434
|
-
"""Generate honeycomb_update_slo tool definition."""
|
|
435
|
-
base_schema = generate_schema_from_model(
|
|
436
|
-
SLOCreate,
|
|
437
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
438
|
-
)
|
|
439
|
-
|
|
440
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "slo_id"]}
|
|
441
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
442
|
-
add_parameter(schema, "slo_id", "string", "The SLO ID to update", required=True)
|
|
443
|
-
|
|
444
|
-
schema["properties"].update(base_schema["properties"])
|
|
445
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
446
|
-
|
|
447
|
-
if "$defs" in base_schema:
|
|
448
|
-
schema["$defs"] = base_schema["$defs"]
|
|
449
|
-
|
|
450
|
-
examples = [
|
|
451
|
-
{
|
|
452
|
-
"dataset": "api-logs",
|
|
453
|
-
"slo_id": "slo-123",
|
|
454
|
-
"name": "API Availability (Updated)",
|
|
455
|
-
"sli": {"alias": "success_rate"},
|
|
456
|
-
"target_per_million": 999500, # Updated from 999000 to 999500 (99.95%)
|
|
457
|
-
"time_period_days": 30,
|
|
458
|
-
},
|
|
459
|
-
]
|
|
460
|
-
|
|
461
|
-
return create_tool_definition(
|
|
462
|
-
name="honeycomb_update_slo",
|
|
463
|
-
description=get_description("honeycomb_update_slo"),
|
|
464
|
-
input_schema=schema,
|
|
465
|
-
input_examples=examples,
|
|
466
|
-
)
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
def generate_delete_slo_tool() -> dict[str, Any]:
|
|
470
|
-
"""Generate honeycomb_delete_slo tool definition."""
|
|
471
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "slo_id"]}
|
|
472
|
-
|
|
473
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
474
|
-
add_parameter(schema, "slo_id", "string", "The SLO ID to delete", required=True)
|
|
475
|
-
|
|
476
|
-
examples = [
|
|
477
|
-
{"dataset": "api-logs", "slo_id": "slo-123"},
|
|
478
|
-
{"dataset": "production", "slo_id": "slo-456"},
|
|
479
|
-
]
|
|
480
|
-
|
|
481
|
-
return create_tool_definition(
|
|
482
|
-
name="honeycomb_delete_slo",
|
|
483
|
-
description=get_description("honeycomb_delete_slo"),
|
|
484
|
-
input_schema=schema,
|
|
485
|
-
input_examples=examples,
|
|
486
|
-
)
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
# ==============================================================================
|
|
490
|
-
# Burn Alerts Tool Definitions
|
|
491
|
-
# ==============================================================================
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
def generate_list_burn_alerts_tool() -> dict[str, Any]:
|
|
495
|
-
"""Generate honeycomb_list_burn_alerts tool definition."""
|
|
496
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "slo_id"]}
|
|
497
|
-
|
|
498
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
499
|
-
add_parameter(schema, "slo_id", "string", "The SLO ID to list burn alerts for", required=True)
|
|
500
|
-
|
|
501
|
-
examples = [
|
|
502
|
-
{"dataset": "api-logs", "slo_id": "slo-123"},
|
|
503
|
-
{"dataset": "production", "slo_id": "slo-456"},
|
|
504
|
-
]
|
|
505
|
-
|
|
506
|
-
return create_tool_definition(
|
|
507
|
-
name="honeycomb_list_burn_alerts",
|
|
508
|
-
description=get_description("honeycomb_list_burn_alerts"),
|
|
509
|
-
input_schema=schema,
|
|
510
|
-
input_examples=examples,
|
|
511
|
-
)
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
def generate_get_burn_alert_tool() -> dict[str, Any]:
|
|
515
|
-
"""Generate honeycomb_get_burn_alert tool definition."""
|
|
516
|
-
schema: dict[str, Any] = {
|
|
517
|
-
"type": "object",
|
|
518
|
-
"properties": {},
|
|
519
|
-
"required": ["dataset", "burn_alert_id"],
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
523
|
-
add_parameter(schema, "burn_alert_id", "string", "The burn alert ID to retrieve", required=True)
|
|
524
|
-
|
|
525
|
-
examples = [
|
|
526
|
-
{"dataset": "api-logs", "burn_alert_id": "ba-123"},
|
|
527
|
-
{"dataset": "production", "burn_alert_id": "ba-456"},
|
|
528
|
-
]
|
|
529
|
-
|
|
530
|
-
return create_tool_definition(
|
|
531
|
-
name="honeycomb_get_burn_alert",
|
|
532
|
-
description=get_description("honeycomb_get_burn_alert"),
|
|
533
|
-
input_schema=schema,
|
|
534
|
-
input_examples=examples,
|
|
535
|
-
)
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
def generate_create_burn_alert_tool() -> dict[str, Any]:
|
|
539
|
-
"""Generate honeycomb_create_burn_alert tool definition."""
|
|
540
|
-
base_schema = generate_schema_from_model(
|
|
541
|
-
BurnAlertCreate,
|
|
542
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
543
|
-
)
|
|
544
|
-
|
|
545
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
546
|
-
add_parameter(
|
|
547
|
-
schema, "dataset", "string", "The dataset slug to create the burn alert in", required=True
|
|
548
|
-
)
|
|
549
|
-
|
|
550
|
-
schema["properties"].update(base_schema["properties"])
|
|
551
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
552
|
-
|
|
553
|
-
if "$defs" in base_schema:
|
|
554
|
-
schema["$defs"] = base_schema["$defs"]
|
|
555
|
-
|
|
556
|
-
examples = [
|
|
557
|
-
# Exhaustion time alert without recipients (recipients are optional)
|
|
558
|
-
{
|
|
559
|
-
"dataset": "api-logs",
|
|
560
|
-
"alert_type": "exhaustion_time",
|
|
561
|
-
"slo_id": "slo-123",
|
|
562
|
-
"exhaustion_minutes": 60,
|
|
563
|
-
},
|
|
564
|
-
# Exhaustion time alert with ID-based recipient
|
|
565
|
-
{
|
|
566
|
-
"dataset": "api-logs",
|
|
567
|
-
"alert_type": "exhaustion_time",
|
|
568
|
-
"slo_id": "slo-456",
|
|
569
|
-
"exhaustion_minutes": 60,
|
|
570
|
-
"recipients": [{"id": "recip-123"}],
|
|
571
|
-
},
|
|
572
|
-
# Budget rate alert with inline recipients
|
|
573
|
-
{
|
|
574
|
-
"dataset": "production",
|
|
575
|
-
"alert_type": "budget_rate",
|
|
576
|
-
"slo_id": "slo-789",
|
|
577
|
-
"budget_rate_window_minutes": 60,
|
|
578
|
-
"budget_rate_decrease_threshold_per_million": 10000, # 1% drop in 1 hour
|
|
579
|
-
"description": "Alert when error budget drops by 1% in 1 hour",
|
|
580
|
-
"recipients": [
|
|
581
|
-
{"type": "email", "target": "sre@example.com"},
|
|
582
|
-
{"type": "slack", "target": "#slo-alerts"},
|
|
583
|
-
],
|
|
584
|
-
},
|
|
585
|
-
# Critical exhaustion alert with PagerDuty
|
|
586
|
-
{
|
|
587
|
-
"dataset": "critical-services",
|
|
588
|
-
"alert_type": "exhaustion_time",
|
|
589
|
-
"slo_id": "slo-abc",
|
|
590
|
-
"exhaustion_minutes": 30,
|
|
591
|
-
"description": "Critical: Budget exhausting in 30 minutes",
|
|
592
|
-
"recipients": [
|
|
593
|
-
{
|
|
594
|
-
"type": "pagerduty",
|
|
595
|
-
"target": "routing-key-critical",
|
|
596
|
-
"details": {"severity": "critical"},
|
|
597
|
-
},
|
|
598
|
-
],
|
|
599
|
-
},
|
|
600
|
-
]
|
|
601
|
-
|
|
602
|
-
return create_tool_definition(
|
|
603
|
-
name="honeycomb_create_burn_alert",
|
|
604
|
-
description=get_description("honeycomb_create_burn_alert"),
|
|
605
|
-
input_schema=schema,
|
|
606
|
-
input_examples=examples,
|
|
607
|
-
)
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
def generate_update_burn_alert_tool() -> dict[str, Any]:
|
|
611
|
-
"""Generate honeycomb_update_burn_alert tool definition."""
|
|
612
|
-
base_schema = generate_schema_from_model(
|
|
613
|
-
BurnAlertCreate,
|
|
614
|
-
exclude_fields={"created_at", "updated_at", "id"},
|
|
615
|
-
)
|
|
616
|
-
|
|
617
|
-
schema: dict[str, Any] = {
|
|
618
|
-
"type": "object",
|
|
619
|
-
"properties": {},
|
|
620
|
-
"required": ["dataset", "burn_alert_id"],
|
|
621
|
-
}
|
|
622
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
623
|
-
add_parameter(schema, "burn_alert_id", "string", "The burn alert ID to update", required=True)
|
|
624
|
-
|
|
625
|
-
schema["properties"].update(base_schema["properties"])
|
|
626
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
627
|
-
|
|
628
|
-
if "$defs" in base_schema:
|
|
629
|
-
schema["$defs"] = base_schema["$defs"]
|
|
630
|
-
|
|
631
|
-
examples = [
|
|
632
|
-
{
|
|
633
|
-
"dataset": "api-logs",
|
|
634
|
-
"burn_alert_id": "ba-123",
|
|
635
|
-
"alert_type": "exhaustion_time",
|
|
636
|
-
"slo_id": "slo-123",
|
|
637
|
-
"exhaustion_minutes": 30, # Updated from 60 to 30
|
|
638
|
-
"recipients": [{"id": "recip-123"}],
|
|
639
|
-
},
|
|
640
|
-
]
|
|
641
|
-
|
|
642
|
-
return create_tool_definition(
|
|
643
|
-
name="honeycomb_update_burn_alert",
|
|
644
|
-
description=get_description("honeycomb_update_burn_alert"),
|
|
645
|
-
input_schema=schema,
|
|
646
|
-
input_examples=examples,
|
|
647
|
-
)
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
def generate_delete_burn_alert_tool() -> dict[str, Any]:
|
|
651
|
-
"""Generate honeycomb_delete_burn_alert tool definition."""
|
|
652
|
-
schema: dict[str, Any] = {
|
|
653
|
-
"type": "object",
|
|
654
|
-
"properties": {},
|
|
655
|
-
"required": ["dataset", "burn_alert_id"],
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
659
|
-
add_parameter(schema, "burn_alert_id", "string", "The burn alert ID to delete", required=True)
|
|
660
|
-
|
|
661
|
-
examples = [
|
|
662
|
-
{"dataset": "api-logs", "burn_alert_id": "ba-123"},
|
|
663
|
-
{"dataset": "production", "burn_alert_id": "ba-456"},
|
|
664
|
-
]
|
|
665
|
-
|
|
666
|
-
return create_tool_definition(
|
|
667
|
-
name="honeycomb_delete_burn_alert",
|
|
668
|
-
description=get_description("honeycomb_delete_burn_alert"),
|
|
669
|
-
input_schema=schema,
|
|
670
|
-
input_examples=examples,
|
|
671
|
-
)
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
# ==============================================================================
|
|
675
|
-
# Datasets Tool Definitions
|
|
676
|
-
# ==============================================================================
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
def generate_list_datasets_tool() -> dict[str, Any]:
|
|
680
|
-
"""Generate honeycomb_list_datasets tool definition."""
|
|
681
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
682
|
-
|
|
683
|
-
examples: list[dict[str, Any]] = [
|
|
684
|
-
{}, # List all datasets
|
|
685
|
-
]
|
|
686
|
-
|
|
687
|
-
return create_tool_definition(
|
|
688
|
-
name="honeycomb_list_datasets",
|
|
689
|
-
description=get_description("honeycomb_list_datasets"),
|
|
690
|
-
input_schema=schema,
|
|
691
|
-
input_examples=examples,
|
|
692
|
-
)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
def generate_get_dataset_tool() -> dict[str, Any]:
|
|
696
|
-
"""Generate honeycomb_get_dataset tool definition."""
|
|
697
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["slug"]}
|
|
698
|
-
|
|
699
|
-
add_parameter(schema, "slug", "string", "The dataset slug to retrieve", required=True)
|
|
700
|
-
|
|
701
|
-
examples: list[dict[str, Any]] = [
|
|
702
|
-
{"slug": "api-logs"},
|
|
703
|
-
{"slug": "production"},
|
|
704
|
-
]
|
|
705
|
-
|
|
706
|
-
return create_tool_definition(
|
|
707
|
-
name="honeycomb_get_dataset",
|
|
708
|
-
description=get_description("honeycomb_get_dataset"),
|
|
709
|
-
input_schema=schema,
|
|
710
|
-
input_examples=examples,
|
|
711
|
-
)
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
def generate_create_dataset_tool() -> dict[str, Any]:
|
|
715
|
-
"""Generate honeycomb_create_dataset tool definition."""
|
|
716
|
-
# Start with DatasetCreate schema
|
|
717
|
-
base_schema = generate_schema_from_model(
|
|
718
|
-
DatasetCreate,
|
|
719
|
-
exclude_fields={"created_at", "last_written_at", "slug", "regular_columns_count"},
|
|
720
|
-
)
|
|
721
|
-
|
|
722
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
723
|
-
schema["properties"].update(base_schema["properties"])
|
|
724
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
725
|
-
|
|
726
|
-
examples: list[dict[str, Any]] = [
|
|
727
|
-
# Minimal example
|
|
728
|
-
{"name": "api-logs"},
|
|
729
|
-
# With description
|
|
730
|
-
{
|
|
731
|
-
"name": "production-logs",
|
|
732
|
-
"description": "Production API logs from main services",
|
|
733
|
-
},
|
|
734
|
-
# With JSON expansion
|
|
735
|
-
{
|
|
736
|
-
"name": "trace-data",
|
|
737
|
-
"description": "Distributed traces with nested JSON",
|
|
738
|
-
"expand_json_depth": 3,
|
|
739
|
-
},
|
|
740
|
-
]
|
|
741
|
-
|
|
742
|
-
return create_tool_definition(
|
|
743
|
-
name="honeycomb_create_dataset",
|
|
744
|
-
description=get_description("honeycomb_create_dataset"),
|
|
745
|
-
input_schema=schema,
|
|
746
|
-
input_examples=examples,
|
|
747
|
-
)
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
def generate_update_dataset_tool() -> dict[str, Any]:
|
|
751
|
-
"""Generate honeycomb_update_dataset tool definition."""
|
|
752
|
-
base_schema = generate_schema_from_model(
|
|
753
|
-
DatasetCreate,
|
|
754
|
-
exclude_fields={"created_at", "last_written_at", "slug", "regular_columns_count"},
|
|
755
|
-
)
|
|
756
|
-
|
|
757
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["slug"]}
|
|
758
|
-
add_parameter(schema, "slug", "string", "The dataset slug to update", required=True)
|
|
759
|
-
|
|
760
|
-
schema["properties"].update(base_schema["properties"])
|
|
761
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
762
|
-
|
|
763
|
-
examples: list[dict[str, Any]] = [
|
|
764
|
-
{"slug": "api-logs", "name": "API Logs", "description": "Updated description"},
|
|
765
|
-
{"slug": "production", "name": "Production", "expand_json_depth": 5},
|
|
766
|
-
]
|
|
767
|
-
|
|
768
|
-
return create_tool_definition(
|
|
769
|
-
name="honeycomb_update_dataset",
|
|
770
|
-
description=get_description("honeycomb_update_dataset"),
|
|
771
|
-
input_schema=schema,
|
|
772
|
-
input_examples=examples,
|
|
773
|
-
)
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
def generate_delete_dataset_tool() -> dict[str, Any]:
|
|
777
|
-
"""Generate honeycomb_delete_dataset tool definition."""
|
|
778
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["slug"]}
|
|
779
|
-
|
|
780
|
-
add_parameter(schema, "slug", "string", "The dataset slug to delete", required=True)
|
|
781
|
-
|
|
782
|
-
examples: list[dict[str, Any]] = [
|
|
783
|
-
{"slug": "test-dataset"},
|
|
784
|
-
{"slug": "old-logs"},
|
|
785
|
-
]
|
|
786
|
-
|
|
787
|
-
return create_tool_definition(
|
|
788
|
-
name="honeycomb_delete_dataset",
|
|
789
|
-
description=get_description("honeycomb_delete_dataset"),
|
|
790
|
-
input_schema=schema,
|
|
791
|
-
input_examples=examples,
|
|
792
|
-
)
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
# ==============================================================================
|
|
796
|
-
# Columns Tool Definitions
|
|
797
|
-
# ==============================================================================
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
def generate_list_columns_tool() -> dict[str, Any]:
|
|
801
|
-
"""Generate honeycomb_list_columns tool definition."""
|
|
802
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
803
|
-
|
|
804
|
-
add_parameter(
|
|
805
|
-
schema, "dataset", "string", "The dataset slug to list columns from", required=True
|
|
806
|
-
)
|
|
807
|
-
|
|
808
|
-
examples: list[dict[str, Any]] = [
|
|
809
|
-
{"dataset": "api-logs"},
|
|
810
|
-
{"dataset": "production"},
|
|
811
|
-
]
|
|
812
|
-
|
|
813
|
-
return create_tool_definition(
|
|
814
|
-
name="honeycomb_list_columns",
|
|
815
|
-
description=get_description("honeycomb_list_columns"),
|
|
816
|
-
input_schema=schema,
|
|
817
|
-
input_examples=examples,
|
|
818
|
-
)
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
def generate_get_column_tool() -> dict[str, Any]:
|
|
822
|
-
"""Generate honeycomb_get_column tool definition."""
|
|
823
|
-
schema: dict[str, Any] = {
|
|
824
|
-
"type": "object",
|
|
825
|
-
"properties": {},
|
|
826
|
-
"required": ["dataset", "column_id"],
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
830
|
-
add_parameter(schema, "column_id", "string", "The column ID to retrieve", required=True)
|
|
831
|
-
|
|
832
|
-
examples: list[dict[str, Any]] = [
|
|
833
|
-
{"dataset": "api-logs", "column_id": "col-123"},
|
|
834
|
-
{"dataset": "production", "column_id": "col-456"},
|
|
835
|
-
]
|
|
836
|
-
|
|
837
|
-
return create_tool_definition(
|
|
838
|
-
name="honeycomb_get_column",
|
|
839
|
-
description=get_description("honeycomb_get_column"),
|
|
840
|
-
input_schema=schema,
|
|
841
|
-
input_examples=examples,
|
|
842
|
-
)
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
def generate_create_column_tool() -> dict[str, Any]:
|
|
846
|
-
"""Generate honeycomb_create_column tool definition."""
|
|
847
|
-
base_schema = generate_schema_from_model(
|
|
848
|
-
ColumnCreate,
|
|
849
|
-
exclude_fields={"id", "created_at", "updated_at", "last_written"},
|
|
850
|
-
)
|
|
851
|
-
|
|
852
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
853
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
854
|
-
|
|
855
|
-
schema["properties"].update(base_schema["properties"])
|
|
856
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
857
|
-
|
|
858
|
-
# Add definitions if present
|
|
859
|
-
if "$defs" in base_schema:
|
|
860
|
-
schema["$defs"] = base_schema["$defs"]
|
|
861
|
-
|
|
862
|
-
examples: list[dict[str, Any]] = [
|
|
863
|
-
# Minimal example (string column)
|
|
864
|
-
{"dataset": "api-logs", "key_name": "endpoint", "type": "string"},
|
|
865
|
-
# With description and type
|
|
866
|
-
{
|
|
867
|
-
"dataset": "api-logs",
|
|
868
|
-
"key_name": "duration_ms",
|
|
869
|
-
"type": "float",
|
|
870
|
-
"description": "Request duration in milliseconds",
|
|
871
|
-
},
|
|
872
|
-
# Hidden column
|
|
873
|
-
{
|
|
874
|
-
"dataset": "production",
|
|
875
|
-
"key_name": "internal_id",
|
|
876
|
-
"type": "integer",
|
|
877
|
-
"hidden": True,
|
|
878
|
-
"description": "Internal debugging ID",
|
|
879
|
-
},
|
|
880
|
-
]
|
|
881
|
-
|
|
882
|
-
return create_tool_definition(
|
|
883
|
-
name="honeycomb_create_column",
|
|
884
|
-
description=get_description("honeycomb_create_column"),
|
|
885
|
-
input_schema=schema,
|
|
886
|
-
input_examples=examples,
|
|
887
|
-
)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
def generate_update_column_tool() -> dict[str, Any]:
|
|
891
|
-
"""Generate honeycomb_update_column tool definition."""
|
|
892
|
-
base_schema = generate_schema_from_model(
|
|
893
|
-
ColumnCreate,
|
|
894
|
-
exclude_fields={"id", "created_at", "updated_at", "last_written"},
|
|
895
|
-
)
|
|
896
|
-
|
|
897
|
-
schema: dict[str, Any] = {
|
|
898
|
-
"type": "object",
|
|
899
|
-
"properties": {},
|
|
900
|
-
"required": ["dataset", "column_id"],
|
|
901
|
-
}
|
|
902
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
903
|
-
add_parameter(schema, "column_id", "string", "The column ID to update", required=True)
|
|
904
|
-
|
|
905
|
-
schema["properties"].update(base_schema["properties"])
|
|
906
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
907
|
-
|
|
908
|
-
# Add definitions if present
|
|
909
|
-
if "$defs" in base_schema:
|
|
910
|
-
schema["$defs"] = base_schema["$defs"]
|
|
911
|
-
|
|
912
|
-
examples: list[dict[str, Any]] = [
|
|
913
|
-
{
|
|
914
|
-
"dataset": "api-logs",
|
|
915
|
-
"column_id": "col-123",
|
|
916
|
-
"key_name": "endpoint",
|
|
917
|
-
"type": "string",
|
|
918
|
-
"description": "API endpoint path",
|
|
919
|
-
},
|
|
920
|
-
{
|
|
921
|
-
"dataset": "production",
|
|
922
|
-
"column_id": "col-456",
|
|
923
|
-
"key_name": "status_code",
|
|
924
|
-
"type": "integer",
|
|
925
|
-
"hidden": False,
|
|
926
|
-
},
|
|
927
|
-
]
|
|
928
|
-
|
|
929
|
-
return create_tool_definition(
|
|
930
|
-
name="honeycomb_update_column",
|
|
931
|
-
description=get_description("honeycomb_update_column"),
|
|
932
|
-
input_schema=schema,
|
|
933
|
-
input_examples=examples,
|
|
934
|
-
)
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
def generate_delete_column_tool() -> dict[str, Any]:
|
|
938
|
-
"""Generate honeycomb_delete_column tool definition."""
|
|
939
|
-
schema: dict[str, Any] = {
|
|
940
|
-
"type": "object",
|
|
941
|
-
"properties": {},
|
|
942
|
-
"required": ["dataset", "column_id"],
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
946
|
-
add_parameter(schema, "column_id", "string", "The column ID to delete", required=True)
|
|
947
|
-
|
|
948
|
-
examples: list[dict[str, Any]] = [
|
|
949
|
-
{"dataset": "api-logs", "column_id": "col-123"},
|
|
950
|
-
{"dataset": "production", "column_id": "col-456"},
|
|
951
|
-
]
|
|
952
|
-
|
|
953
|
-
return create_tool_definition(
|
|
954
|
-
name="honeycomb_delete_column",
|
|
955
|
-
description=get_description("honeycomb_delete_column"),
|
|
956
|
-
input_schema=schema,
|
|
957
|
-
input_examples=examples,
|
|
958
|
-
)
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
# ==============================================================================
|
|
962
|
-
# Recipients Tool Definitions
|
|
963
|
-
# ==============================================================================
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
def generate_list_recipients_tool() -> dict[str, Any]:
|
|
967
|
-
"""Generate honeycomb_list_recipients tool definition."""
|
|
968
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
969
|
-
|
|
970
|
-
examples: list[dict[str, Any]] = [
|
|
971
|
-
{}, # List all recipients
|
|
972
|
-
]
|
|
973
|
-
|
|
974
|
-
return create_tool_definition(
|
|
975
|
-
name="honeycomb_list_recipients",
|
|
976
|
-
description=get_description("honeycomb_list_recipients"),
|
|
977
|
-
input_schema=schema,
|
|
978
|
-
input_examples=examples,
|
|
979
|
-
)
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
def generate_get_recipient_tool() -> dict[str, Any]:
|
|
983
|
-
"""Generate honeycomb_get_recipient tool definition."""
|
|
984
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["recipient_id"]}
|
|
985
|
-
|
|
986
|
-
add_parameter(schema, "recipient_id", "string", "The recipient ID to retrieve", required=True)
|
|
987
|
-
|
|
988
|
-
examples: list[dict[str, Any]] = [
|
|
989
|
-
{"recipient_id": "rec-123"},
|
|
990
|
-
{"recipient_id": "rec-456"},
|
|
991
|
-
]
|
|
992
|
-
|
|
993
|
-
return create_tool_definition(
|
|
994
|
-
name="honeycomb_get_recipient",
|
|
995
|
-
description=get_description("honeycomb_get_recipient"),
|
|
996
|
-
input_schema=schema,
|
|
997
|
-
input_examples=examples,
|
|
998
|
-
)
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
def generate_create_recipient_tool() -> dict[str, Any]:
|
|
1002
|
-
"""Generate honeycomb_create_recipient tool definition."""
|
|
1003
|
-
base_schema = generate_schema_from_model(
|
|
1004
|
-
RecipientCreate,
|
|
1005
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1006
|
-
)
|
|
1007
|
-
|
|
1008
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
1009
|
-
schema["properties"].update(base_schema["properties"])
|
|
1010
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1011
|
-
|
|
1012
|
-
# Add definitions if present
|
|
1013
|
-
if "$defs" in base_schema:
|
|
1014
|
-
schema["$defs"] = base_schema["$defs"]
|
|
1015
|
-
|
|
1016
|
-
examples: list[dict[str, Any]] = [
|
|
1017
|
-
# Email recipient
|
|
1018
|
-
{
|
|
1019
|
-
"type": "email",
|
|
1020
|
-
"details": {"email_address": "alerts@example.com"},
|
|
1021
|
-
},
|
|
1022
|
-
# Slack channel
|
|
1023
|
-
{
|
|
1024
|
-
"type": "slack",
|
|
1025
|
-
"details": {"channel": "#alerts"},
|
|
1026
|
-
},
|
|
1027
|
-
# PagerDuty
|
|
1028
|
-
{
|
|
1029
|
-
"type": "pagerduty",
|
|
1030
|
-
"details": {"routing_key": "abc123def456"},
|
|
1031
|
-
},
|
|
1032
|
-
# Webhook
|
|
1033
|
-
{
|
|
1034
|
-
"type": "webhook",
|
|
1035
|
-
"details": {
|
|
1036
|
-
"url": "https://hooks.example.com/alerts",
|
|
1037
|
-
"secret": "webhook-secret-key",
|
|
1038
|
-
},
|
|
1039
|
-
},
|
|
1040
|
-
]
|
|
1041
|
-
|
|
1042
|
-
return create_tool_definition(
|
|
1043
|
-
name="honeycomb_create_recipient",
|
|
1044
|
-
description=get_description("honeycomb_create_recipient"),
|
|
1045
|
-
input_schema=schema,
|
|
1046
|
-
input_examples=examples,
|
|
1047
|
-
)
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
def generate_update_recipient_tool() -> dict[str, Any]:
|
|
1051
|
-
"""Generate honeycomb_update_recipient tool definition."""
|
|
1052
|
-
base_schema = generate_schema_from_model(
|
|
1053
|
-
RecipientCreate,
|
|
1054
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1055
|
-
)
|
|
1056
|
-
|
|
1057
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["recipient_id"]}
|
|
1058
|
-
add_parameter(schema, "recipient_id", "string", "The recipient ID to update", required=True)
|
|
1059
|
-
|
|
1060
|
-
schema["properties"].update(base_schema["properties"])
|
|
1061
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1062
|
-
|
|
1063
|
-
# Add definitions if present
|
|
1064
|
-
if "$defs" in base_schema:
|
|
1065
|
-
schema["$defs"] = base_schema["$defs"]
|
|
1066
|
-
|
|
1067
|
-
examples: list[dict[str, Any]] = [
|
|
1068
|
-
{
|
|
1069
|
-
"recipient_id": "rec-123",
|
|
1070
|
-
"type": "email",
|
|
1071
|
-
"details": {"email_address": "new-alerts@example.com"},
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"recipient_id": "rec-456",
|
|
1075
|
-
"type": "slack",
|
|
1076
|
-
"details": {"channel": "#new-alerts"},
|
|
1077
|
-
},
|
|
1078
|
-
]
|
|
1079
|
-
|
|
1080
|
-
return create_tool_definition(
|
|
1081
|
-
name="honeycomb_update_recipient",
|
|
1082
|
-
description=get_description("honeycomb_update_recipient"),
|
|
1083
|
-
input_schema=schema,
|
|
1084
|
-
input_examples=examples,
|
|
1085
|
-
)
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
def generate_delete_recipient_tool() -> dict[str, Any]:
|
|
1089
|
-
"""Generate honeycomb_delete_recipient tool definition."""
|
|
1090
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["recipient_id"]}
|
|
1091
|
-
|
|
1092
|
-
add_parameter(schema, "recipient_id", "string", "The recipient ID to delete", required=True)
|
|
1093
|
-
|
|
1094
|
-
examples: list[dict[str, Any]] = [
|
|
1095
|
-
{"recipient_id": "rec-123"},
|
|
1096
|
-
{"recipient_id": "rec-456"},
|
|
1097
|
-
]
|
|
1098
|
-
|
|
1099
|
-
return create_tool_definition(
|
|
1100
|
-
name="honeycomb_delete_recipient",
|
|
1101
|
-
description=get_description("honeycomb_delete_recipient"),
|
|
1102
|
-
input_schema=schema,
|
|
1103
|
-
input_examples=examples,
|
|
1104
|
-
)
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
def generate_get_recipient_triggers_tool() -> dict[str, Any]:
|
|
1108
|
-
"""Generate honeycomb_get_recipient_triggers tool definition."""
|
|
1109
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["recipient_id"]}
|
|
1110
|
-
|
|
1111
|
-
add_parameter(
|
|
1112
|
-
schema,
|
|
1113
|
-
"recipient_id",
|
|
1114
|
-
"string",
|
|
1115
|
-
"The recipient ID to get associated triggers for",
|
|
1116
|
-
required=True,
|
|
1117
|
-
)
|
|
1118
|
-
|
|
1119
|
-
examples: list[dict[str, Any]] = [
|
|
1120
|
-
{"recipient_id": "rec-123"},
|
|
1121
|
-
{"recipient_id": "rec-456"},
|
|
1122
|
-
]
|
|
1123
|
-
|
|
1124
|
-
return create_tool_definition(
|
|
1125
|
-
name="honeycomb_get_recipient_triggers",
|
|
1126
|
-
description=get_description("honeycomb_get_recipient_triggers"),
|
|
1127
|
-
input_schema=schema,
|
|
1128
|
-
input_examples=examples,
|
|
1129
|
-
)
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
# ==============================================================================
|
|
1133
|
-
# Derived Columns Tool Definitions
|
|
1134
|
-
# ==============================================================================
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
def generate_list_derived_columns_tool() -> dict[str, Any]:
|
|
1138
|
-
"""Generate honeycomb_list_derived_columns tool definition."""
|
|
1139
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1140
|
-
|
|
1141
|
-
add_parameter(
|
|
1142
|
-
schema,
|
|
1143
|
-
"dataset",
|
|
1144
|
-
"string",
|
|
1145
|
-
"The dataset slug to list derived columns from (use '__all__' for environment-wide)",
|
|
1146
|
-
required=True,
|
|
1147
|
-
)
|
|
1148
|
-
|
|
1149
|
-
examples: list[dict[str, Any]] = [
|
|
1150
|
-
{"dataset": "api-logs"},
|
|
1151
|
-
{"dataset": "__all__"},
|
|
1152
|
-
]
|
|
1153
|
-
|
|
1154
|
-
return create_tool_definition(
|
|
1155
|
-
name="honeycomb_list_derived_columns",
|
|
1156
|
-
description=get_description("honeycomb_list_derived_columns"),
|
|
1157
|
-
input_schema=schema,
|
|
1158
|
-
input_examples=examples,
|
|
1159
|
-
)
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
def generate_get_derived_column_tool() -> dict[str, Any]:
|
|
1163
|
-
"""Generate honeycomb_get_derived_column tool definition."""
|
|
1164
|
-
schema: dict[str, Any] = {
|
|
1165
|
-
"type": "object",
|
|
1166
|
-
"properties": {},
|
|
1167
|
-
"required": ["dataset", "derived_column_id"],
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1171
|
-
add_parameter(
|
|
1172
|
-
schema, "derived_column_id", "string", "The derived column ID to retrieve", required=True
|
|
1173
|
-
)
|
|
1174
|
-
|
|
1175
|
-
examples: list[dict[str, Any]] = [
|
|
1176
|
-
{"dataset": "api-logs", "derived_column_id": "dc-123"},
|
|
1177
|
-
{"dataset": "__all__", "derived_column_id": "dc-456"},
|
|
1178
|
-
]
|
|
1179
|
-
|
|
1180
|
-
return create_tool_definition(
|
|
1181
|
-
name="honeycomb_get_derived_column",
|
|
1182
|
-
description=get_description("honeycomb_get_derived_column"),
|
|
1183
|
-
input_schema=schema,
|
|
1184
|
-
input_examples=examples,
|
|
1185
|
-
)
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
def generate_create_derived_column_tool() -> dict[str, Any]:
|
|
1189
|
-
"""Generate honeycomb_create_derived_column tool definition."""
|
|
1190
|
-
base_schema = generate_schema_from_model(
|
|
1191
|
-
DerivedColumnCreate,
|
|
1192
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1193
|
-
)
|
|
1194
|
-
|
|
1195
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1196
|
-
add_parameter(
|
|
1197
|
-
schema,
|
|
1198
|
-
"dataset",
|
|
1199
|
-
"string",
|
|
1200
|
-
"The dataset slug (use '__all__' for environment-wide)",
|
|
1201
|
-
required=True,
|
|
1202
|
-
)
|
|
1203
|
-
|
|
1204
|
-
schema["properties"].update(base_schema["properties"])
|
|
1205
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1206
|
-
|
|
1207
|
-
examples: list[dict[str, Any]] = [
|
|
1208
|
-
# Boolean flag
|
|
1209
|
-
{
|
|
1210
|
-
"dataset": "api-logs",
|
|
1211
|
-
"alias": "is_error",
|
|
1212
|
-
"expression": "IF(GTE($status_code, 500), 1, 0)",
|
|
1213
|
-
"description": "1 if error, 0 otherwise",
|
|
1214
|
-
},
|
|
1215
|
-
# Categorization
|
|
1216
|
-
{
|
|
1217
|
-
"dataset": "api-logs",
|
|
1218
|
-
"alias": "status_category",
|
|
1219
|
-
"expression": "IF(LT($status_code, 400), 'success', IF(LT($status_code, 500), 'client_error', 'server_error'))",
|
|
1220
|
-
},
|
|
1221
|
-
# Environment-wide
|
|
1222
|
-
{
|
|
1223
|
-
"dataset": "__all__",
|
|
1224
|
-
"alias": "request_success",
|
|
1225
|
-
"expression": "IF(LT($status_code, 400), 1, 0)",
|
|
1226
|
-
"description": "Success indicator for all datasets",
|
|
1227
|
-
},
|
|
1228
|
-
]
|
|
1229
|
-
|
|
1230
|
-
return create_tool_definition(
|
|
1231
|
-
name="honeycomb_create_derived_column",
|
|
1232
|
-
description=get_description("honeycomb_create_derived_column"),
|
|
1233
|
-
input_schema=schema,
|
|
1234
|
-
input_examples=examples,
|
|
1235
|
-
)
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
def generate_update_derived_column_tool() -> dict[str, Any]:
|
|
1239
|
-
"""Generate honeycomb_update_derived_column tool definition."""
|
|
1240
|
-
base_schema = generate_schema_from_model(
|
|
1241
|
-
DerivedColumnCreate,
|
|
1242
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1243
|
-
)
|
|
1244
|
-
|
|
1245
|
-
schema: dict[str, Any] = {
|
|
1246
|
-
"type": "object",
|
|
1247
|
-
"properties": {},
|
|
1248
|
-
"required": ["dataset", "derived_column_id"],
|
|
1249
|
-
}
|
|
1250
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1251
|
-
add_parameter(
|
|
1252
|
-
schema, "derived_column_id", "string", "The derived column ID to update", required=True
|
|
1253
|
-
)
|
|
1254
|
-
|
|
1255
|
-
schema["properties"].update(base_schema["properties"])
|
|
1256
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1257
|
-
|
|
1258
|
-
examples: list[dict[str, Any]] = [
|
|
1259
|
-
{
|
|
1260
|
-
"dataset": "api-logs",
|
|
1261
|
-
"derived_column_id": "dc-123",
|
|
1262
|
-
"alias": "is_error",
|
|
1263
|
-
"expression": "IF(GTE($status_code, 500), 1, 0)",
|
|
1264
|
-
"description": "Updated error flag",
|
|
1265
|
-
},
|
|
1266
|
-
]
|
|
1267
|
-
|
|
1268
|
-
return create_tool_definition(
|
|
1269
|
-
name="honeycomb_update_derived_column",
|
|
1270
|
-
description=get_description("honeycomb_update_derived_column"),
|
|
1271
|
-
input_schema=schema,
|
|
1272
|
-
input_examples=examples,
|
|
1273
|
-
)
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
def generate_delete_derived_column_tool() -> dict[str, Any]:
|
|
1277
|
-
"""Generate honeycomb_delete_derived_column tool definition."""
|
|
1278
|
-
schema: dict[str, Any] = {
|
|
1279
|
-
"type": "object",
|
|
1280
|
-
"properties": {},
|
|
1281
|
-
"required": ["dataset", "derived_column_id"],
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1285
|
-
add_parameter(
|
|
1286
|
-
schema, "derived_column_id", "string", "The derived column ID to delete", required=True
|
|
1287
|
-
)
|
|
1288
|
-
|
|
1289
|
-
examples: list[dict[str, Any]] = [
|
|
1290
|
-
{"dataset": "api-logs", "derived_column_id": "dc-123"},
|
|
1291
|
-
{"dataset": "__all__", "derived_column_id": "dc-456"},
|
|
1292
|
-
]
|
|
1293
|
-
|
|
1294
|
-
return create_tool_definition(
|
|
1295
|
-
name="honeycomb_delete_derived_column",
|
|
1296
|
-
description=get_description("honeycomb_delete_derived_column"),
|
|
1297
|
-
input_schema=schema,
|
|
1298
|
-
input_examples=examples,
|
|
1299
|
-
)
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
# ==============================================================================
|
|
1303
|
-
# Boards Tool Definitions
|
|
1304
|
-
# ==============================================================================
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
def generate_list_boards_tool() -> dict[str, Any]:
|
|
1308
|
-
"""Generate honeycomb_list_boards tool definition."""
|
|
1309
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
1310
|
-
|
|
1311
|
-
examples: list[dict[str, Any]] = [
|
|
1312
|
-
{}, # List all boards
|
|
1313
|
-
]
|
|
1314
|
-
|
|
1315
|
-
return create_tool_definition(
|
|
1316
|
-
name="honeycomb_list_boards",
|
|
1317
|
-
description=get_description("honeycomb_list_boards"),
|
|
1318
|
-
input_schema=schema,
|
|
1319
|
-
input_examples=examples,
|
|
1320
|
-
)
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
def generate_get_board_tool() -> dict[str, Any]:
|
|
1324
|
-
"""Generate honeycomb_get_board tool definition."""
|
|
1325
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["board_id"]}
|
|
1326
|
-
|
|
1327
|
-
add_parameter(schema, "board_id", "string", "The board ID to retrieve", required=True)
|
|
1328
|
-
|
|
1329
|
-
examples: list[dict[str, Any]] = [
|
|
1330
|
-
{"board_id": "board-123"},
|
|
1331
|
-
{"board_id": "board-456"},
|
|
1332
|
-
]
|
|
1333
|
-
|
|
1334
|
-
return create_tool_definition(
|
|
1335
|
-
name="honeycomb_get_board",
|
|
1336
|
-
description=get_description("honeycomb_get_board"),
|
|
1337
|
-
input_schema=schema,
|
|
1338
|
-
input_examples=examples,
|
|
1339
|
-
)
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
def generate_create_board_tool() -> dict[str, Any]:
|
|
1343
|
-
"""Generate honeycomb_create_board tool definition."""
|
|
1344
|
-
# Build schema manually for complex nested structure
|
|
1345
|
-
schema: dict[str, Any] = {
|
|
1346
|
-
"type": "object",
|
|
1347
|
-
"properties": {},
|
|
1348
|
-
"required": ["name"],
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
add_parameter(schema, "name", "string", "Board name", required=True)
|
|
1352
|
-
add_parameter(schema, "description", "string", "Board description", required=False)
|
|
1353
|
-
add_parameter(
|
|
1354
|
-
schema,
|
|
1355
|
-
"layout_generation",
|
|
1356
|
-
"string",
|
|
1357
|
-
"Layout mode: 'auto' or 'manual' (default: auto)",
|
|
1358
|
-
required=False,
|
|
1359
|
-
)
|
|
1360
|
-
|
|
1361
|
-
# Inline query panels array
|
|
1362
|
-
schema["properties"]["inline_query_panels"] = {
|
|
1363
|
-
"type": "array",
|
|
1364
|
-
"description": "Array of query panels to create inline (each creates a new query)",
|
|
1365
|
-
"items": {
|
|
1366
|
-
"type": "object",
|
|
1367
|
-
"properties": {
|
|
1368
|
-
"name": {"type": "string", "description": "Panel/query name"},
|
|
1369
|
-
"dataset": {"type": "string", "description": "Dataset slug"},
|
|
1370
|
-
"time_range": {"type": "integer", "description": "Time range in seconds"},
|
|
1371
|
-
"calculations": {
|
|
1372
|
-
"type": "array",
|
|
1373
|
-
"description": "Array of calculation objects",
|
|
1374
|
-
"items": {"type": "object"},
|
|
1375
|
-
},
|
|
1376
|
-
"filters": {
|
|
1377
|
-
"type": "array",
|
|
1378
|
-
"description": "Array of filter objects",
|
|
1379
|
-
"items": {"type": "object"},
|
|
1380
|
-
},
|
|
1381
|
-
"breakdowns": {
|
|
1382
|
-
"type": "array",
|
|
1383
|
-
"description": "Fields to group by",
|
|
1384
|
-
"items": {"type": "string"},
|
|
1385
|
-
},
|
|
1386
|
-
"orders": {
|
|
1387
|
-
"type": "array",
|
|
1388
|
-
"description": "Ordering specifications",
|
|
1389
|
-
"items": {"type": "object"},
|
|
1390
|
-
},
|
|
1391
|
-
"limit": {"type": "integer", "description": "Result limit"},
|
|
1392
|
-
"style": {
|
|
1393
|
-
"type": "string",
|
|
1394
|
-
"description": "Panel style: graph, table, or combo",
|
|
1395
|
-
},
|
|
1396
|
-
},
|
|
1397
|
-
"required": ["name"], # dataset is optional (defaults to environment-wide)
|
|
1398
|
-
},
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
# Inline SLO panels array
|
|
1402
|
-
schema["properties"]["inline_slo_panels"] = {
|
|
1403
|
-
"type": "array",
|
|
1404
|
-
"description": "Array of SLO definitions to create inline",
|
|
1405
|
-
"items": {
|
|
1406
|
-
"type": "object",
|
|
1407
|
-
"properties": {
|
|
1408
|
-
"name": {"type": "string", "description": "SLO name"},
|
|
1409
|
-
"dataset": {"type": "string", "description": "Dataset slug"},
|
|
1410
|
-
"sli": {
|
|
1411
|
-
"type": "object",
|
|
1412
|
-
"description": "SLI definition (alias + optional expression for inline creation)",
|
|
1413
|
-
"properties": {
|
|
1414
|
-
"alias": {"type": "string", "description": "Derived column alias"},
|
|
1415
|
-
"expression": {
|
|
1416
|
-
"type": "string",
|
|
1417
|
-
"description": "Optional expression (creates derived column inline)",
|
|
1418
|
-
},
|
|
1419
|
-
"description": {"type": "string"},
|
|
1420
|
-
},
|
|
1421
|
-
"required": ["alias"],
|
|
1422
|
-
},
|
|
1423
|
-
"target_per_million": {"type": "integer"},
|
|
1424
|
-
"target_percentage": {"type": "number"},
|
|
1425
|
-
"target_nines": {"type": "integer"},
|
|
1426
|
-
"time_period_days": {"type": "integer"},
|
|
1427
|
-
"time_period_weeks": {"type": "integer"},
|
|
1428
|
-
"description": {"type": "string"},
|
|
1429
|
-
},
|
|
1430
|
-
"required": ["name", "dataset", "sli"],
|
|
1431
|
-
},
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
# Text panels array
|
|
1435
|
-
schema["properties"]["text_panels"] = {
|
|
1436
|
-
"type": "array",
|
|
1437
|
-
"description": "Array of markdown text panels",
|
|
1438
|
-
"items": {
|
|
1439
|
-
"type": "object",
|
|
1440
|
-
"properties": {
|
|
1441
|
-
"content": {"type": "string", "description": "Markdown text content"},
|
|
1442
|
-
},
|
|
1443
|
-
"required": ["content"],
|
|
1444
|
-
},
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
# SLO panels array (IDs)
|
|
1448
|
-
schema["properties"]["slo_panels"] = {
|
|
1449
|
-
"type": "array",
|
|
1450
|
-
"description": "Array of existing SLO IDs to display as panels",
|
|
1451
|
-
"items": {"type": "string"},
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
# Tags
|
|
1455
|
-
schema["properties"]["tags"] = {
|
|
1456
|
-
"type": "array",
|
|
1457
|
-
"description": "Array of tag objects",
|
|
1458
|
-
"items": {
|
|
1459
|
-
"type": "object",
|
|
1460
|
-
"properties": {
|
|
1461
|
-
"key": {"type": "string"},
|
|
1462
|
-
"value": {"type": "string"},
|
|
1463
|
-
},
|
|
1464
|
-
},
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
examples: list[dict[str, Any]] = [
|
|
1468
|
-
# Simple: inline query panels with auto-layout
|
|
1469
|
-
{
|
|
1470
|
-
"name": "API Dashboard",
|
|
1471
|
-
"layout_generation": "auto",
|
|
1472
|
-
"inline_query_panels": [
|
|
1473
|
-
{
|
|
1474
|
-
"name": "Error Count",
|
|
1475
|
-
"dataset": "api-logs",
|
|
1476
|
-
"time_range": 3600,
|
|
1477
|
-
"calculations": [{"op": "COUNT"}],
|
|
1478
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
1479
|
-
},
|
|
1480
|
-
{
|
|
1481
|
-
"name": "P99 Latency",
|
|
1482
|
-
"dataset": "api-logs",
|
|
1483
|
-
"time_range": 3600,
|
|
1484
|
-
"calculations": [{"op": "P99", "column": "duration_ms"}],
|
|
1485
|
-
},
|
|
1486
|
-
],
|
|
1487
|
-
},
|
|
1488
|
-
# With text panel
|
|
1489
|
-
{
|
|
1490
|
-
"name": "Service Overview",
|
|
1491
|
-
"description": "Main service health dashboard",
|
|
1492
|
-
"layout_generation": "auto",
|
|
1493
|
-
"inline_query_panels": [
|
|
1494
|
-
{
|
|
1495
|
-
"name": "Request Rate",
|
|
1496
|
-
"dataset": "production",
|
|
1497
|
-
"time_range": 7200,
|
|
1498
|
-
"calculations": [{"op": "COUNT"}],
|
|
1499
|
-
"breakdowns": ["endpoint"],
|
|
1500
|
-
}
|
|
1501
|
-
],
|
|
1502
|
-
"text_panels": [{"content": "## Service Status\nMonitor during peak hours"}],
|
|
1503
|
-
},
|
|
1504
|
-
# Complex: with existing SLO ID
|
|
1505
|
-
{
|
|
1506
|
-
"name": "SRE Dashboard",
|
|
1507
|
-
"layout_generation": "auto",
|
|
1508
|
-
"inline_query_panels": [
|
|
1509
|
-
{
|
|
1510
|
-
"name": "Error Rate",
|
|
1511
|
-
"dataset": "api-logs",
|
|
1512
|
-
"time_range": 3600,
|
|
1513
|
-
"calculations": [{"op": "COUNT"}],
|
|
1514
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
1515
|
-
"breakdowns": ["service"],
|
|
1516
|
-
"orders": [{"op": "COUNT", "order": "descending"}],
|
|
1517
|
-
"limit": 20,
|
|
1518
|
-
}
|
|
1519
|
-
],
|
|
1520
|
-
"slo_panels": ["slo-123"],
|
|
1521
|
-
"text_panels": [{"content": "## Alerts\nCheck PagerDuty for incidents"}],
|
|
1522
|
-
"tags": [{"key": "team", "value": "platform"}],
|
|
1523
|
-
},
|
|
1524
|
-
# Advanced: inline SLO creation with derived column
|
|
1525
|
-
{
|
|
1526
|
-
"name": "Production Monitoring",
|
|
1527
|
-
"layout_generation": "auto",
|
|
1528
|
-
"inline_query_panels": [
|
|
1529
|
-
{
|
|
1530
|
-
"name": "Request Count",
|
|
1531
|
-
"dataset": "production",
|
|
1532
|
-
"time_range": 86400,
|
|
1533
|
-
"calculations": [{"op": "COUNT"}],
|
|
1534
|
-
"breakdowns": ["service"],
|
|
1535
|
-
}
|
|
1536
|
-
],
|
|
1537
|
-
"inline_slo_panels": [
|
|
1538
|
-
{
|
|
1539
|
-
"name": "API Availability",
|
|
1540
|
-
"dataset": "api-logs",
|
|
1541
|
-
"sli": {
|
|
1542
|
-
"alias": "success_rate",
|
|
1543
|
-
"expression": "IF(LT($status_code, 400), 1, 0)",
|
|
1544
|
-
"description": "1 if successful, 0 if error",
|
|
1545
|
-
},
|
|
1546
|
-
"target_nines": 3,
|
|
1547
|
-
"time_period_days": 30,
|
|
1548
|
-
"description": "99.9% availability target",
|
|
1549
|
-
}
|
|
1550
|
-
],
|
|
1551
|
-
"text_panels": [{"content": "## SLO Policy\nReview weekly"}],
|
|
1552
|
-
},
|
|
1553
|
-
]
|
|
1554
|
-
|
|
1555
|
-
return create_tool_definition(
|
|
1556
|
-
name="honeycomb_create_board",
|
|
1557
|
-
description=get_description("honeycomb_create_board"),
|
|
1558
|
-
input_schema=schema,
|
|
1559
|
-
input_examples=examples,
|
|
1560
|
-
)
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
def generate_update_board_tool() -> dict[str, Any]:
|
|
1564
|
-
"""Generate honeycomb_update_board tool definition."""
|
|
1565
|
-
base_schema = generate_schema_from_model(
|
|
1566
|
-
BoardCreate,
|
|
1567
|
-
exclude_fields={"id", "links"},
|
|
1568
|
-
)
|
|
1569
|
-
|
|
1570
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["board_id"]}
|
|
1571
|
-
add_parameter(schema, "board_id", "string", "The board ID to update", required=True)
|
|
1572
|
-
|
|
1573
|
-
schema["properties"].update(base_schema["properties"])
|
|
1574
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1575
|
-
|
|
1576
|
-
examples: list[dict[str, Any]] = [
|
|
1577
|
-
{
|
|
1578
|
-
"board_id": "board-123",
|
|
1579
|
-
"name": "Updated Dashboard",
|
|
1580
|
-
"description": "New description",
|
|
1581
|
-
},
|
|
1582
|
-
]
|
|
1583
|
-
|
|
1584
|
-
return create_tool_definition(
|
|
1585
|
-
name="honeycomb_update_board",
|
|
1586
|
-
description=get_description("honeycomb_update_board"),
|
|
1587
|
-
input_schema=schema,
|
|
1588
|
-
input_examples=examples,
|
|
1589
|
-
)
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
def generate_delete_board_tool() -> dict[str, Any]:
|
|
1593
|
-
"""Generate honeycomb_delete_board tool definition."""
|
|
1594
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["board_id"]}
|
|
1595
|
-
|
|
1596
|
-
add_parameter(schema, "board_id", "string", "The board ID to delete", required=True)
|
|
1597
|
-
|
|
1598
|
-
examples: list[dict[str, Any]] = [
|
|
1599
|
-
{"board_id": "board-123"},
|
|
1600
|
-
{"board_id": "board-456"},
|
|
1601
|
-
]
|
|
1602
|
-
|
|
1603
|
-
return create_tool_definition(
|
|
1604
|
-
name="honeycomb_delete_board",
|
|
1605
|
-
description=get_description("honeycomb_delete_board"),
|
|
1606
|
-
input_schema=schema,
|
|
1607
|
-
input_examples=examples,
|
|
1608
|
-
)
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
# ==============================================================================
|
|
1612
|
-
# Queries Tool Definitions
|
|
1613
|
-
# ==============================================================================
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
def generate_create_query_tool() -> dict[str, Any]:
|
|
1617
|
-
"""Generate honeycomb_create_query tool definition."""
|
|
1618
|
-
base_schema = generate_schema_from_model(
|
|
1619
|
-
QuerySpec,
|
|
1620
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1621
|
-
)
|
|
1622
|
-
|
|
1623
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1624
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1625
|
-
|
|
1626
|
-
# Add optional annotation_name parameter
|
|
1627
|
-
add_parameter(
|
|
1628
|
-
schema,
|
|
1629
|
-
"annotation_name",
|
|
1630
|
-
"string",
|
|
1631
|
-
"Optional name for the query annotation (saves query with a display name)",
|
|
1632
|
-
required=False,
|
|
1633
|
-
)
|
|
1634
|
-
|
|
1635
|
-
schema["properties"].update(base_schema["properties"])
|
|
1636
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1637
|
-
|
|
1638
|
-
# Add definitions if present
|
|
1639
|
-
if "$defs" in base_schema:
|
|
1640
|
-
schema["$defs"] = base_schema["$defs"]
|
|
1641
|
-
|
|
1642
|
-
examples: list[dict[str, Any]] = [
|
|
1643
|
-
# Simple COUNT query
|
|
1644
|
-
{
|
|
1645
|
-
"dataset": "api-logs",
|
|
1646
|
-
"time_range": 3600,
|
|
1647
|
-
"calculations": [{"op": "COUNT"}],
|
|
1648
|
-
},
|
|
1649
|
-
# P99 with filters
|
|
1650
|
-
{
|
|
1651
|
-
"dataset": "api-logs",
|
|
1652
|
-
"time_range": 3600,
|
|
1653
|
-
"calculations": [{"op": "P99", "column": "duration_ms"}],
|
|
1654
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 200}],
|
|
1655
|
-
},
|
|
1656
|
-
# With annotation name
|
|
1657
|
-
{
|
|
1658
|
-
"dataset": "api-logs",
|
|
1659
|
-
"annotation_name": "Error Rate Dashboard",
|
|
1660
|
-
"time_range": 7200,
|
|
1661
|
-
"calculations": [{"op": "COUNT"}],
|
|
1662
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
1663
|
-
},
|
|
1664
|
-
]
|
|
1665
|
-
|
|
1666
|
-
return create_tool_definition(
|
|
1667
|
-
name="honeycomb_create_query",
|
|
1668
|
-
description=get_description("honeycomb_create_query"),
|
|
1669
|
-
input_schema=schema,
|
|
1670
|
-
input_examples=examples,
|
|
1671
|
-
)
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
def generate_get_query_tool() -> dict[str, Any]:
|
|
1675
|
-
"""Generate honeycomb_get_query tool definition."""
|
|
1676
|
-
schema: dict[str, Any] = {
|
|
1677
|
-
"type": "object",
|
|
1678
|
-
"properties": {},
|
|
1679
|
-
"required": ["dataset", "query_id"],
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1683
|
-
add_parameter(schema, "query_id", "string", "The query ID to retrieve", required=True)
|
|
1684
|
-
|
|
1685
|
-
examples: list[dict[str, Any]] = [
|
|
1686
|
-
{"dataset": "api-logs", "query_id": "q-123"},
|
|
1687
|
-
{"dataset": "production", "query_id": "q-456"},
|
|
1688
|
-
]
|
|
1689
|
-
|
|
1690
|
-
return create_tool_definition(
|
|
1691
|
-
name="honeycomb_get_query",
|
|
1692
|
-
description=get_description("honeycomb_get_query"),
|
|
1693
|
-
input_schema=schema,
|
|
1694
|
-
input_examples=examples,
|
|
1695
|
-
)
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
def generate_run_query_tool() -> dict[str, Any]:
|
|
1699
|
-
"""Generate honeycomb_run_query tool definition."""
|
|
1700
|
-
base_schema = generate_schema_from_model(
|
|
1701
|
-
QuerySpec,
|
|
1702
|
-
exclude_fields={"id", "created_at", "updated_at"},
|
|
1703
|
-
)
|
|
1704
|
-
|
|
1705
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1706
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1707
|
-
|
|
1708
|
-
schema["properties"].update(base_schema["properties"])
|
|
1709
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1710
|
-
|
|
1711
|
-
# Add definitions if present
|
|
1712
|
-
if "$defs" in base_schema:
|
|
1713
|
-
schema["$defs"] = base_schema["$defs"]
|
|
1714
|
-
|
|
1715
|
-
examples: list[dict[str, Any]] = [
|
|
1716
|
-
# Count in last hour
|
|
1717
|
-
{
|
|
1718
|
-
"dataset": "api-logs",
|
|
1719
|
-
"time_range": 3600,
|
|
1720
|
-
"calculations": [{"op": "COUNT"}],
|
|
1721
|
-
},
|
|
1722
|
-
# P99 with breakdowns
|
|
1723
|
-
{
|
|
1724
|
-
"dataset": "api-logs",
|
|
1725
|
-
"time_range": 7200,
|
|
1726
|
-
"calculations": [{"op": "P99", "column": "duration_ms"}],
|
|
1727
|
-
"breakdowns": ["endpoint"],
|
|
1728
|
-
},
|
|
1729
|
-
# Multiple calculations with filters and ordering
|
|
1730
|
-
{
|
|
1731
|
-
"dataset": "api-logs",
|
|
1732
|
-
"time_range": 3600,
|
|
1733
|
-
"calculations": [
|
|
1734
|
-
{"op": "COUNT"},
|
|
1735
|
-
{"op": "AVG", "column": "duration_ms"},
|
|
1736
|
-
{"op": "P99", "column": "duration_ms"},
|
|
1737
|
-
],
|
|
1738
|
-
"filters": [{"column": "status_code", "op": ">=", "value": 500}],
|
|
1739
|
-
"orders": [{"column": "COUNT", "order": "descending"}],
|
|
1740
|
-
"limit": 100,
|
|
1741
|
-
},
|
|
1742
|
-
]
|
|
1743
|
-
|
|
1744
|
-
return create_tool_definition(
|
|
1745
|
-
name="honeycomb_run_query",
|
|
1746
|
-
description=get_description("honeycomb_run_query"),
|
|
1747
|
-
input_schema=schema,
|
|
1748
|
-
input_examples=examples,
|
|
1749
|
-
)
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
# ==============================================================================
|
|
1753
|
-
# Markers Tool Definitions
|
|
1754
|
-
# ==============================================================================
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
def generate_list_markers_tool() -> dict[str, Any]:
|
|
1758
|
-
"""Generate honeycomb_list_markers tool definition."""
|
|
1759
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1760
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1761
|
-
|
|
1762
|
-
examples: list[dict[str, Any]] = [{"dataset": "api-logs"}, {"dataset": "production"}]
|
|
1763
|
-
|
|
1764
|
-
return create_tool_definition(
|
|
1765
|
-
name="honeycomb_list_markers",
|
|
1766
|
-
description=get_description("honeycomb_list_markers"),
|
|
1767
|
-
input_schema=schema,
|
|
1768
|
-
input_examples=examples,
|
|
1769
|
-
)
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
def generate_create_marker_tool() -> dict[str, Any]:
|
|
1773
|
-
"""Generate honeycomb_create_marker tool definition."""
|
|
1774
|
-
base_schema = generate_schema_from_model(
|
|
1775
|
-
MarkerCreate, exclude_fields={"id", "created_at", "updated_at", "color"}
|
|
1776
|
-
)
|
|
1777
|
-
|
|
1778
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1779
|
-
add_parameter(
|
|
1780
|
-
schema,
|
|
1781
|
-
"dataset",
|
|
1782
|
-
"string",
|
|
1783
|
-
"The dataset slug (or '__all__' for environment-wide)",
|
|
1784
|
-
required=True,
|
|
1785
|
-
)
|
|
1786
|
-
add_parameter(schema, "color", "string", "Optional hex color (e.g., '#FF5733')", required=False)
|
|
1787
|
-
|
|
1788
|
-
schema["properties"].update(base_schema["properties"])
|
|
1789
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1790
|
-
|
|
1791
|
-
examples: list[dict[str, Any]] = [
|
|
1792
|
-
{"dataset": "api-logs", "message": "deploy v1.2.3", "type": "deploy"},
|
|
1793
|
-
{
|
|
1794
|
-
"dataset": "__all__",
|
|
1795
|
-
"message": "maintenance window",
|
|
1796
|
-
"type": "maintenance",
|
|
1797
|
-
"start_time": 1640000000,
|
|
1798
|
-
"end_time": 1640003600,
|
|
1799
|
-
},
|
|
1800
|
-
{"dataset": "production", "message": "config change", "type": "config", "color": "#FF5733"},
|
|
1801
|
-
]
|
|
1802
|
-
|
|
1803
|
-
return create_tool_definition(
|
|
1804
|
-
name="honeycomb_create_marker",
|
|
1805
|
-
description=get_description("honeycomb_create_marker"),
|
|
1806
|
-
input_schema=schema,
|
|
1807
|
-
input_examples=examples,
|
|
1808
|
-
)
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
def generate_update_marker_tool() -> dict[str, Any]:
|
|
1812
|
-
"""Generate honeycomb_update_marker tool definition."""
|
|
1813
|
-
base_schema = generate_schema_from_model(
|
|
1814
|
-
MarkerCreate, exclude_fields={"id", "created_at", "updated_at", "color"}
|
|
1815
|
-
)
|
|
1816
|
-
|
|
1817
|
-
schema: dict[str, Any] = {
|
|
1818
|
-
"type": "object",
|
|
1819
|
-
"properties": {},
|
|
1820
|
-
"required": ["dataset", "marker_id"],
|
|
1821
|
-
}
|
|
1822
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1823
|
-
add_parameter(schema, "marker_id", "string", "The marker ID to update", required=True)
|
|
1824
|
-
|
|
1825
|
-
schema["properties"].update(base_schema["properties"])
|
|
1826
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1827
|
-
|
|
1828
|
-
examples: list[dict[str, Any]] = [
|
|
1829
|
-
{
|
|
1830
|
-
"dataset": "api-logs",
|
|
1831
|
-
"marker_id": "abc123",
|
|
1832
|
-
"message": "updated deploy v1.2.4",
|
|
1833
|
-
"type": "deploy",
|
|
1834
|
-
},
|
|
1835
|
-
]
|
|
1836
|
-
|
|
1837
|
-
return create_tool_definition(
|
|
1838
|
-
name="honeycomb_update_marker",
|
|
1839
|
-
description=get_description("honeycomb_update_marker"),
|
|
1840
|
-
input_schema=schema,
|
|
1841
|
-
input_examples=examples,
|
|
1842
|
-
)
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
def generate_delete_marker_tool() -> dict[str, Any]:
|
|
1846
|
-
"""Generate honeycomb_delete_marker tool definition."""
|
|
1847
|
-
schema: dict[str, Any] = {
|
|
1848
|
-
"type": "object",
|
|
1849
|
-
"properties": {},
|
|
1850
|
-
"required": ["dataset", "marker_id"],
|
|
1851
|
-
}
|
|
1852
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1853
|
-
add_parameter(schema, "marker_id", "string", "The marker ID to delete", required=True)
|
|
1854
|
-
|
|
1855
|
-
examples: list[dict[str, Any]] = [{"dataset": "api-logs", "marker_id": "abc123"}]
|
|
1856
|
-
|
|
1857
|
-
return create_tool_definition(
|
|
1858
|
-
name="honeycomb_delete_marker",
|
|
1859
|
-
description=get_description("honeycomb_delete_marker"),
|
|
1860
|
-
input_schema=schema,
|
|
1861
|
-
input_examples=examples,
|
|
1862
|
-
)
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
def generate_list_marker_settings_tool() -> dict[str, Any]:
|
|
1866
|
-
"""Generate honeycomb_list_marker_settings tool definition."""
|
|
1867
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1868
|
-
add_parameter(
|
|
1869
|
-
schema,
|
|
1870
|
-
"dataset",
|
|
1871
|
-
"string",
|
|
1872
|
-
"The dataset slug (or '__all__' for environment-wide)",
|
|
1873
|
-
required=True,
|
|
1874
|
-
)
|
|
1875
|
-
|
|
1876
|
-
examples: list[dict[str, Any]] = [{"dataset": "api-logs"}, {"dataset": "__all__"}]
|
|
1877
|
-
|
|
1878
|
-
return create_tool_definition(
|
|
1879
|
-
name="honeycomb_list_marker_settings",
|
|
1880
|
-
description=get_description("honeycomb_list_marker_settings"),
|
|
1881
|
-
input_schema=schema,
|
|
1882
|
-
input_examples=examples,
|
|
1883
|
-
)
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
def generate_get_marker_setting_tool() -> dict[str, Any]:
|
|
1887
|
-
"""Generate honeycomb_get_marker_setting tool definition."""
|
|
1888
|
-
schema: dict[str, Any] = {
|
|
1889
|
-
"type": "object",
|
|
1890
|
-
"properties": {},
|
|
1891
|
-
"required": ["dataset", "setting_id"],
|
|
1892
|
-
}
|
|
1893
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1894
|
-
add_parameter(schema, "setting_id", "string", "The marker setting ID", required=True)
|
|
1895
|
-
|
|
1896
|
-
examples: list[dict[str, Any]] = [{"dataset": "api-logs", "setting_id": "set-123"}]
|
|
1897
|
-
|
|
1898
|
-
return create_tool_definition(
|
|
1899
|
-
name="honeycomb_get_marker_setting",
|
|
1900
|
-
description=get_description("honeycomb_get_marker_setting"),
|
|
1901
|
-
input_schema=schema,
|
|
1902
|
-
input_examples=examples,
|
|
1903
|
-
)
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
def generate_create_marker_setting_tool() -> dict[str, Any]:
|
|
1907
|
-
"""Generate honeycomb_create_marker_setting tool definition."""
|
|
1908
|
-
base_schema = generate_schema_from_model(
|
|
1909
|
-
MarkerSettingCreate, exclude_fields={"id", "created_at", "updated_at"}
|
|
1910
|
-
)
|
|
1911
|
-
|
|
1912
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset"]}
|
|
1913
|
-
add_parameter(
|
|
1914
|
-
schema,
|
|
1915
|
-
"dataset",
|
|
1916
|
-
"string",
|
|
1917
|
-
"The dataset slug (or '__all__' for environment-wide)",
|
|
1918
|
-
required=True,
|
|
1919
|
-
)
|
|
1920
|
-
|
|
1921
|
-
schema["properties"].update(base_schema["properties"])
|
|
1922
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1923
|
-
|
|
1924
|
-
examples: list[dict[str, Any]] = [
|
|
1925
|
-
{"dataset": "api-logs", "type": "deploy", "color": "#00FF00"},
|
|
1926
|
-
{"dataset": "__all__", "type": "incident", "color": "#FF0000"},
|
|
1927
|
-
]
|
|
1928
|
-
|
|
1929
|
-
return create_tool_definition(
|
|
1930
|
-
name="honeycomb_create_marker_setting",
|
|
1931
|
-
description=get_description("honeycomb_create_marker_setting"),
|
|
1932
|
-
input_schema=schema,
|
|
1933
|
-
input_examples=examples,
|
|
1934
|
-
)
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
def generate_update_marker_setting_tool() -> dict[str, Any]:
|
|
1938
|
-
"""Generate honeycomb_update_marker_setting tool definition."""
|
|
1939
|
-
base_schema = generate_schema_from_model(
|
|
1940
|
-
MarkerSettingCreate, exclude_fields={"id", "created_at", "updated_at"}
|
|
1941
|
-
)
|
|
1942
|
-
|
|
1943
|
-
schema: dict[str, Any] = {
|
|
1944
|
-
"type": "object",
|
|
1945
|
-
"properties": {},
|
|
1946
|
-
"required": ["dataset", "setting_id"],
|
|
1947
|
-
}
|
|
1948
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1949
|
-
add_parameter(schema, "setting_id", "string", "The marker setting ID to update", required=True)
|
|
1950
|
-
|
|
1951
|
-
schema["properties"].update(base_schema["properties"])
|
|
1952
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
1953
|
-
|
|
1954
|
-
examples: list[dict[str, Any]] = [
|
|
1955
|
-
{"dataset": "api-logs", "setting_id": "set-123", "type": "deploy", "color": "#0000FF"},
|
|
1956
|
-
]
|
|
1957
|
-
|
|
1958
|
-
return create_tool_definition(
|
|
1959
|
-
name="honeycomb_update_marker_setting",
|
|
1960
|
-
description=get_description("honeycomb_update_marker_setting"),
|
|
1961
|
-
input_schema=schema,
|
|
1962
|
-
input_examples=examples,
|
|
1963
|
-
)
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
def generate_delete_marker_setting_tool() -> dict[str, Any]:
|
|
1967
|
-
"""Generate honeycomb_delete_marker_setting tool definition."""
|
|
1968
|
-
schema: dict[str, Any] = {
|
|
1969
|
-
"type": "object",
|
|
1970
|
-
"properties": {},
|
|
1971
|
-
"required": ["dataset", "setting_id"],
|
|
1972
|
-
}
|
|
1973
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1974
|
-
add_parameter(schema, "setting_id", "string", "The marker setting ID to delete", required=True)
|
|
1975
|
-
|
|
1976
|
-
examples: list[dict[str, Any]] = [{"dataset": "api-logs", "setting_id": "set-123"}]
|
|
1977
|
-
|
|
1978
|
-
return create_tool_definition(
|
|
1979
|
-
name="honeycomb_delete_marker_setting",
|
|
1980
|
-
description=get_description("honeycomb_delete_marker_setting"),
|
|
1981
|
-
input_schema=schema,
|
|
1982
|
-
input_examples=examples,
|
|
1983
|
-
)
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
# ==============================================================================
|
|
1987
|
-
# Events Tool Definitions
|
|
1988
|
-
# ==============================================================================
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
def generate_send_event_tool() -> dict[str, Any]:
|
|
1992
|
-
"""Generate honeycomb_send_event tool definition."""
|
|
1993
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "data"]}
|
|
1994
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
1995
|
-
add_parameter(schema, "data", "object", "Event data as key-value pairs", required=True)
|
|
1996
|
-
add_parameter(schema, "timestamp", "integer", "Unix timestamp for the event", required=False)
|
|
1997
|
-
add_parameter(schema, "samplerate", "integer", "Sample rate (default: 1)", required=False)
|
|
1998
|
-
|
|
1999
|
-
examples: list[dict[str, Any]] = [
|
|
2000
|
-
{
|
|
2001
|
-
"dataset": "api-logs",
|
|
2002
|
-
"data": {"endpoint": "/api/users", "duration_ms": 42, "status_code": 200},
|
|
2003
|
-
},
|
|
2004
|
-
{
|
|
2005
|
-
"dataset": "production",
|
|
2006
|
-
"data": {"service": "auth", "latency": 15},
|
|
2007
|
-
"timestamp": 1640000000,
|
|
2008
|
-
},
|
|
2009
|
-
]
|
|
2010
|
-
|
|
2011
|
-
return create_tool_definition(
|
|
2012
|
-
name="honeycomb_send_event",
|
|
2013
|
-
description=get_description("honeycomb_send_event"),
|
|
2014
|
-
input_schema=schema,
|
|
2015
|
-
input_examples=examples,
|
|
2016
|
-
)
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
def generate_send_batch_events_tool() -> dict[str, Any]:
|
|
2020
|
-
"""Generate honeycomb_send_batch_events tool definition."""
|
|
2021
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": ["dataset", "events"]}
|
|
2022
|
-
add_parameter(schema, "dataset", "string", "The dataset slug", required=True)
|
|
2023
|
-
|
|
2024
|
-
schema["properties"]["events"] = {
|
|
2025
|
-
"type": "array",
|
|
2026
|
-
"description": "Array of event objects. Each event must have a 'data' field with event payload.",
|
|
2027
|
-
"items": {
|
|
2028
|
-
"type": "object",
|
|
2029
|
-
"properties": {
|
|
2030
|
-
"data": {
|
|
2031
|
-
"type": "object",
|
|
2032
|
-
"description": "Event payload as key-value pairs (required for each event)",
|
|
2033
|
-
},
|
|
2034
|
-
"time": {
|
|
2035
|
-
"type": "string",
|
|
2036
|
-
"description": "Event timestamp in ISO8601 format (e.g., '2024-01-15T10:30:00Z'). Optional, defaults to server time.",
|
|
2037
|
-
},
|
|
2038
|
-
"samplerate": {
|
|
2039
|
-
"type": "integer",
|
|
2040
|
-
"description": "Sample rate for this event (optional, defaults to 1)",
|
|
2041
|
-
},
|
|
2042
|
-
},
|
|
2043
|
-
"required": ["data"],
|
|
2044
|
-
},
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
examples: list[dict[str, Any]] = [
|
|
2048
|
-
{
|
|
2049
|
-
"dataset": "api-logs",
|
|
2050
|
-
"events": [
|
|
2051
|
-
{
|
|
2052
|
-
"data": {"endpoint": "/api/users", "duration_ms": 42, "status_code": 200},
|
|
2053
|
-
"time": "2024-01-15T10:30:00Z",
|
|
2054
|
-
},
|
|
2055
|
-
{
|
|
2056
|
-
"data": {"endpoint": "/api/posts", "duration_ms": 18, "status_code": 201},
|
|
2057
|
-
"time": "2024-01-15T10:30:15Z",
|
|
2058
|
-
},
|
|
2059
|
-
],
|
|
2060
|
-
},
|
|
2061
|
-
]
|
|
2062
|
-
|
|
2063
|
-
return create_tool_definition(
|
|
2064
|
-
name="honeycomb_send_batch_events",
|
|
2065
|
-
description=get_description("honeycomb_send_batch_events"),
|
|
2066
|
-
input_schema=schema,
|
|
2067
|
-
input_examples=examples,
|
|
2068
|
-
)
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
# ==============================================================================
|
|
2072
|
-
# Service Map Dependencies Tool Definitions
|
|
2073
|
-
# ==============================================================================
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
def generate_query_service_map_tool() -> dict[str, Any]:
|
|
2077
|
-
"""Generate honeycomb_query_service_map tool definition."""
|
|
2078
|
-
base_schema = generate_schema_from_model(
|
|
2079
|
-
ServiceMapDependencyRequestCreate,
|
|
2080
|
-
exclude_fields={"id", "status"},
|
|
2081
|
-
)
|
|
2082
|
-
|
|
2083
|
-
schema: dict[str, Any] = {"type": "object", "properties": {}, "required": []}
|
|
2084
|
-
schema["properties"].update(base_schema["properties"])
|
|
2085
|
-
schema["required"].extend(base_schema.get("required", []))
|
|
2086
|
-
|
|
2087
|
-
# Add max_pages parameter
|
|
2088
|
-
add_parameter(
|
|
2089
|
-
schema,
|
|
2090
|
-
"max_pages",
|
|
2091
|
-
"integer",
|
|
2092
|
-
"Maximum pages to fetch (default: 640, up to 64K results)",
|
|
2093
|
-
required=False,
|
|
2094
|
-
)
|
|
2095
|
-
|
|
2096
|
-
examples: list[dict[str, Any]] = [
|
|
2097
|
-
# Simple: last 2 hours
|
|
2098
|
-
{"time_range": 7200},
|
|
2099
|
-
# With filters
|
|
2100
|
-
{"time_range": 3600, "filters": [{"name": "user-service"}]},
|
|
2101
|
-
# Absolute time range
|
|
2102
|
-
{"start_time": 1640000000, "end_time": 1640003600},
|
|
2103
|
-
]
|
|
2104
|
-
|
|
2105
|
-
return create_tool_definition(
|
|
2106
|
-
name="honeycomb_query_service_map",
|
|
2107
|
-
description=get_description("honeycomb_query_service_map"),
|
|
2108
|
-
input_schema=schema,
|
|
2109
|
-
input_examples=examples,
|
|
2110
|
-
)
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
# ==============================================================================
|
|
2114
|
-
# Generator Functions
|
|
2115
|
-
# ==============================================================================
|
|
53
|
+
# Resource module mapping
|
|
54
|
+
RESOURCE_MODULES = {
|
|
55
|
+
"api_keys": resources.api_keys,
|
|
56
|
+
"auth": resources.auth,
|
|
57
|
+
"boards": resources.boards,
|
|
58
|
+
"burn_alerts": resources.burn_alerts,
|
|
59
|
+
"columns": resources.columns,
|
|
60
|
+
"datasets": resources.datasets,
|
|
61
|
+
"derived_columns": resources.derived_columns,
|
|
62
|
+
"environments": resources.environments,
|
|
63
|
+
"events": resources.events,
|
|
64
|
+
"marker_settings": resources.marker_settings,
|
|
65
|
+
"markers": resources.markers,
|
|
66
|
+
"queries": resources.queries,
|
|
67
|
+
"recipients": resources.recipients,
|
|
68
|
+
"service_map": resources.service_map,
|
|
69
|
+
"slos": resources.slos,
|
|
70
|
+
"triggers": resources.triggers,
|
|
71
|
+
}
|
|
2116
72
|
|
|
2117
73
|
|
|
2118
74
|
def generate_all_tools() -> list[dict[str, Any]]:
|
|
2119
75
|
"""Generate all tool definitions.
|
|
2120
76
|
|
|
2121
77
|
Returns:
|
|
2122
|
-
List of
|
|
2123
|
-
- Priority 1: Triggers (5), SLOs (5), Burn Alerts (5) = 15 tools
|
|
2124
|
-
- Batch 1: Datasets (5), Columns (5) = 10 tools
|
|
2125
|
-
- Batch 2: Recipients (6), Derived Columns (5) = 11 tools
|
|
2126
|
-
- Batch 3a: Queries (3) = 3 tools
|
|
2127
|
-
- Batch 3b: Boards (5) = 5 tools
|
|
2128
|
-
- Batch 4: Markers (4), Marker Settings (5), Events (2), Service Map (1) = 12 tools
|
|
78
|
+
List of 67 tool definitions from all resources.
|
|
2129
79
|
"""
|
|
2130
|
-
tools = [
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
# Batch 1: Columns
|
|
2156
|
-
generate_list_columns_tool(),
|
|
2157
|
-
generate_get_column_tool(),
|
|
2158
|
-
generate_create_column_tool(),
|
|
2159
|
-
generate_update_column_tool(),
|
|
2160
|
-
generate_delete_column_tool(),
|
|
2161
|
-
# Batch 2: Recipients
|
|
2162
|
-
generate_list_recipients_tool(),
|
|
2163
|
-
generate_get_recipient_tool(),
|
|
2164
|
-
generate_create_recipient_tool(),
|
|
2165
|
-
generate_update_recipient_tool(),
|
|
2166
|
-
generate_delete_recipient_tool(),
|
|
2167
|
-
generate_get_recipient_triggers_tool(),
|
|
2168
|
-
# Batch 2: Derived Columns
|
|
2169
|
-
generate_list_derived_columns_tool(),
|
|
2170
|
-
generate_get_derived_column_tool(),
|
|
2171
|
-
generate_create_derived_column_tool(),
|
|
2172
|
-
generate_update_derived_column_tool(),
|
|
2173
|
-
generate_delete_derived_column_tool(),
|
|
2174
|
-
# Batch 3a: Queries
|
|
2175
|
-
generate_create_query_tool(),
|
|
2176
|
-
generate_get_query_tool(),
|
|
2177
|
-
generate_run_query_tool(),
|
|
2178
|
-
# Batch 3b: Boards
|
|
2179
|
-
generate_list_boards_tool(),
|
|
2180
|
-
generate_get_board_tool(),
|
|
2181
|
-
generate_create_board_tool(),
|
|
2182
|
-
generate_update_board_tool(),
|
|
2183
|
-
generate_delete_board_tool(),
|
|
2184
|
-
# Batch 4: Markers
|
|
2185
|
-
generate_list_markers_tool(),
|
|
2186
|
-
generate_create_marker_tool(),
|
|
2187
|
-
generate_update_marker_tool(),
|
|
2188
|
-
generate_delete_marker_tool(),
|
|
2189
|
-
# Batch 4: Marker Settings
|
|
2190
|
-
generate_list_marker_settings_tool(),
|
|
2191
|
-
generate_get_marker_setting_tool(),
|
|
2192
|
-
generate_create_marker_setting_tool(),
|
|
2193
|
-
generate_update_marker_setting_tool(),
|
|
2194
|
-
generate_delete_marker_setting_tool(),
|
|
2195
|
-
# Batch 4: Events
|
|
2196
|
-
generate_send_event_tool(),
|
|
2197
|
-
generate_send_batch_events_tool(),
|
|
2198
|
-
# Batch 4: Service Map
|
|
2199
|
-
generate_query_service_map_tool(),
|
|
2200
|
-
]
|
|
80
|
+
tools = []
|
|
81
|
+
|
|
82
|
+
# Order matters for logical grouping
|
|
83
|
+
resource_order = [
|
|
84
|
+
"auth",
|
|
85
|
+
"api_keys",
|
|
86
|
+
"environments",
|
|
87
|
+
"triggers",
|
|
88
|
+
"slos",
|
|
89
|
+
"burn_alerts",
|
|
90
|
+
"datasets",
|
|
91
|
+
"columns",
|
|
92
|
+
"recipients",
|
|
93
|
+
"derived_columns",
|
|
94
|
+
"queries",
|
|
95
|
+
"boards",
|
|
96
|
+
"markers",
|
|
97
|
+
"marker_settings",
|
|
98
|
+
"events",
|
|
99
|
+
"service_map",
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
for resource in resource_order:
|
|
103
|
+
module = RESOURCE_MODULES[resource]
|
|
104
|
+
tools.extend(module.get_tools())
|
|
2201
105
|
|
|
2202
106
|
return tools
|
|
2203
107
|
|
|
@@ -2206,7 +110,7 @@ def generate_tools_for_resource(resource: str) -> list[dict[str, Any]]:
|
|
|
2206
110
|
"""Generate tool definitions for a specific resource.
|
|
2207
111
|
|
|
2208
112
|
Args:
|
|
2209
|
-
resource: Resource name (triggers, slos, burn_alerts,
|
|
113
|
+
resource: Resource name (triggers, slos, burn_alerts, etc.)
|
|
2210
114
|
|
|
2211
115
|
Returns:
|
|
2212
116
|
List of tool definitions for that resource
|
|
@@ -2214,97 +118,13 @@ def generate_tools_for_resource(resource: str) -> list[dict[str, Any]]:
|
|
|
2214
118
|
Raises:
|
|
2215
119
|
ValueError: If resource name is invalid
|
|
2216
120
|
"""
|
|
2217
|
-
|
|
2218
|
-
"triggers": [
|
|
2219
|
-
generate_list_triggers_tool,
|
|
2220
|
-
generate_get_trigger_tool,
|
|
2221
|
-
generate_create_trigger_tool,
|
|
2222
|
-
generate_update_trigger_tool,
|
|
2223
|
-
generate_delete_trigger_tool,
|
|
2224
|
-
],
|
|
2225
|
-
"slos": [
|
|
2226
|
-
generate_list_slos_tool,
|
|
2227
|
-
generate_get_slo_tool,
|
|
2228
|
-
generate_create_slo_tool,
|
|
2229
|
-
generate_update_slo_tool,
|
|
2230
|
-
generate_delete_slo_tool,
|
|
2231
|
-
],
|
|
2232
|
-
"burn_alerts": [
|
|
2233
|
-
generate_list_burn_alerts_tool,
|
|
2234
|
-
generate_get_burn_alert_tool,
|
|
2235
|
-
generate_create_burn_alert_tool,
|
|
2236
|
-
generate_update_burn_alert_tool,
|
|
2237
|
-
generate_delete_burn_alert_tool,
|
|
2238
|
-
],
|
|
2239
|
-
"datasets": [
|
|
2240
|
-
generate_list_datasets_tool,
|
|
2241
|
-
generate_get_dataset_tool,
|
|
2242
|
-
generate_create_dataset_tool,
|
|
2243
|
-
generate_update_dataset_tool,
|
|
2244
|
-
generate_delete_dataset_tool,
|
|
2245
|
-
],
|
|
2246
|
-
"columns": [
|
|
2247
|
-
generate_list_columns_tool,
|
|
2248
|
-
generate_get_column_tool,
|
|
2249
|
-
generate_create_column_tool,
|
|
2250
|
-
generate_update_column_tool,
|
|
2251
|
-
generate_delete_column_tool,
|
|
2252
|
-
],
|
|
2253
|
-
"recipients": [
|
|
2254
|
-
generate_list_recipients_tool,
|
|
2255
|
-
generate_get_recipient_tool,
|
|
2256
|
-
generate_create_recipient_tool,
|
|
2257
|
-
generate_update_recipient_tool,
|
|
2258
|
-
generate_delete_recipient_tool,
|
|
2259
|
-
generate_get_recipient_triggers_tool,
|
|
2260
|
-
],
|
|
2261
|
-
"derived_columns": [
|
|
2262
|
-
generate_list_derived_columns_tool,
|
|
2263
|
-
generate_get_derived_column_tool,
|
|
2264
|
-
generate_create_derived_column_tool,
|
|
2265
|
-
generate_update_derived_column_tool,
|
|
2266
|
-
generate_delete_derived_column_tool,
|
|
2267
|
-
],
|
|
2268
|
-
"queries": [
|
|
2269
|
-
generate_create_query_tool,
|
|
2270
|
-
generate_get_query_tool,
|
|
2271
|
-
generate_run_query_tool,
|
|
2272
|
-
],
|
|
2273
|
-
"boards": [
|
|
2274
|
-
generate_list_boards_tool,
|
|
2275
|
-
generate_get_board_tool,
|
|
2276
|
-
generate_create_board_tool,
|
|
2277
|
-
generate_update_board_tool,
|
|
2278
|
-
generate_delete_board_tool,
|
|
2279
|
-
],
|
|
2280
|
-
"markers": [
|
|
2281
|
-
generate_list_markers_tool,
|
|
2282
|
-
generate_create_marker_tool,
|
|
2283
|
-
generate_update_marker_tool,
|
|
2284
|
-
generate_delete_marker_tool,
|
|
2285
|
-
],
|
|
2286
|
-
"marker_settings": [
|
|
2287
|
-
generate_list_marker_settings_tool,
|
|
2288
|
-
generate_get_marker_setting_tool,
|
|
2289
|
-
generate_create_marker_setting_tool,
|
|
2290
|
-
generate_update_marker_setting_tool,
|
|
2291
|
-
generate_delete_marker_setting_tool,
|
|
2292
|
-
],
|
|
2293
|
-
"events": [
|
|
2294
|
-
generate_send_event_tool,
|
|
2295
|
-
generate_send_batch_events_tool,
|
|
2296
|
-
],
|
|
2297
|
-
"service_map": [
|
|
2298
|
-
generate_query_service_map_tool,
|
|
2299
|
-
],
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
|
-
if resource not in generators:
|
|
121
|
+
if resource not in RESOURCE_MODULES:
|
|
2303
122
|
raise ValueError(
|
|
2304
|
-
f"Invalid resource '{resource}'.
|
|
123
|
+
f"Invalid resource '{resource}'. "
|
|
124
|
+
f"Valid resources: {', '.join(sorted(RESOURCE_MODULES.keys()))}"
|
|
2305
125
|
)
|
|
2306
126
|
|
|
2307
|
-
return [
|
|
127
|
+
return RESOURCE_MODULES[resource].get_tools()
|
|
2308
128
|
|
|
2309
129
|
|
|
2310
130
|
def export_tools_json(tools: list[dict[str, Any]], output_path: str) -> None:
|
|
@@ -2314,14 +134,7 @@ def export_tools_json(tools: list[dict[str, Any]], output_path: str) -> None:
|
|
|
2314
134
|
tools: List of tool definitions
|
|
2315
135
|
output_path: Path to write JSON file
|
|
2316
136
|
"""
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
output = {
|
|
2320
|
-
"tools": tools,
|
|
2321
|
-
"version": "0.1.0",
|
|
2322
|
-
"generated_at": datetime.now(timezone.utc).isoformat(),
|
|
2323
|
-
"count": len(tools),
|
|
2324
|
-
}
|
|
137
|
+
output = {"tools": tools}
|
|
2325
138
|
|
|
2326
139
|
with open(output_path, "w") as f:
|
|
2327
140
|
json.dump(output, f, indent=2)
|
|
@@ -2336,7 +149,6 @@ def export_tools_python(tools: list[dict[str, Any]], output_path: str) -> None:
|
|
|
2336
149
|
"""
|
|
2337
150
|
from datetime import datetime, timezone
|
|
2338
151
|
|
|
2339
|
-
# Generate the Python code
|
|
2340
152
|
code = f'''"""Auto-generated Honeycomb tool definitions for Claude API.
|
|
2341
153
|
|
|
2342
154
|
Generated at: {datetime.now(timezone.utc).isoformat()}
|
|
@@ -2350,14 +162,7 @@ HONEYCOMB_TOOLS: list[dict[str, Any]] = {json.dumps(tools, indent=4)}
|
|
|
2350
162
|
|
|
2351
163
|
|
|
2352
164
|
def get_tool(name: str) -> dict[str, Any] | None:
|
|
2353
|
-
"""Get a tool definition by name.
|
|
2354
|
-
|
|
2355
|
-
Args:
|
|
2356
|
-
name: Tool name (e.g., "honeycomb_create_trigger")
|
|
2357
|
-
|
|
2358
|
-
Returns:
|
|
2359
|
-
Tool definition dict or None if not found
|
|
2360
|
-
"""
|
|
165
|
+
"""Get a tool definition by name."""
|
|
2361
166
|
for tool in HONEYCOMB_TOOLS:
|
|
2362
167
|
if tool["name"] == name:
|
|
2363
168
|
return tool
|
|
@@ -2365,20 +170,12 @@ def get_tool(name: str) -> dict[str, Any] | None:
|
|
|
2365
170
|
|
|
2366
171
|
|
|
2367
172
|
def get_all_tools() -> list[dict[str, Any]]:
|
|
2368
|
-
"""Get all tool definitions.
|
|
2369
|
-
|
|
2370
|
-
Returns:
|
|
2371
|
-
List of all tool definitions
|
|
2372
|
-
"""
|
|
173
|
+
"""Get all tool definitions."""
|
|
2373
174
|
return HONEYCOMB_TOOLS.copy()
|
|
2374
175
|
|
|
2375
176
|
|
|
2376
177
|
def list_tool_names() -> list[str]:
|
|
2377
|
-
"""Get list of all tool names.
|
|
2378
|
-
|
|
2379
|
-
Returns:
|
|
2380
|
-
List of tool names
|
|
2381
|
-
"""
|
|
178
|
+
"""Get list of all tool names."""
|
|
2382
179
|
return [tool["name"] for tool in HONEYCOMB_TOOLS]
|
|
2383
180
|
'''
|
|
2384
181
|
|