brave-real-browser-mcp-server 2.7.3 → 2.7.4
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.
- package/dist/tool-definitions.js +356 -0
- package/package.json +1 -1
package/dist/tool-definitions.js
CHANGED
|
@@ -606,6 +606,362 @@ export const TOOLS = [
|
|
|
606
606
|
required: ['selector'],
|
|
607
607
|
},
|
|
608
608
|
},
|
|
609
|
+
{
|
|
610
|
+
name: 'clean_text',
|
|
611
|
+
description: 'Clean and normalize text content (remove extra whitespace, special characters)',
|
|
612
|
+
inputSchema: {
|
|
613
|
+
type: 'object',
|
|
614
|
+
properties: {
|
|
615
|
+
text: {
|
|
616
|
+
type: 'string',
|
|
617
|
+
description: 'Text to clean',
|
|
618
|
+
},
|
|
619
|
+
options: {
|
|
620
|
+
type: 'object',
|
|
621
|
+
description: 'Cleaning options',
|
|
622
|
+
properties: {
|
|
623
|
+
removeWhitespace: { type: 'boolean', default: true },
|
|
624
|
+
removeSpecialChars: { type: 'boolean', default: false },
|
|
625
|
+
toLowerCase: { type: 'boolean', default: false },
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
required: ['text'],
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: 'parse_price',
|
|
634
|
+
description: 'Parse and normalize price strings from various formats',
|
|
635
|
+
inputSchema: {
|
|
636
|
+
type: 'object',
|
|
637
|
+
properties: {
|
|
638
|
+
priceText: {
|
|
639
|
+
type: 'string',
|
|
640
|
+
description: 'Price text to parse (e.g., "$19.99", "₹1,234.56")',
|
|
641
|
+
},
|
|
642
|
+
currency: {
|
|
643
|
+
type: 'string',
|
|
644
|
+
description: 'Expected currency code (optional)',
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
required: ['priceText'],
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
name: 'normalize_date',
|
|
652
|
+
description: 'Parse and normalize date strings to ISO format',
|
|
653
|
+
inputSchema: {
|
|
654
|
+
type: 'object',
|
|
655
|
+
properties: {
|
|
656
|
+
dateText: {
|
|
657
|
+
type: 'string',
|
|
658
|
+
description: 'Date text to parse',
|
|
659
|
+
},
|
|
660
|
+
format: {
|
|
661
|
+
type: 'string',
|
|
662
|
+
description: 'Expected date format (optional)',
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
required: ['dateText'],
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: 'wait_for_ajax',
|
|
670
|
+
description: 'Wait for all AJAX/XHR requests to complete',
|
|
671
|
+
inputSchema: {
|
|
672
|
+
type: 'object',
|
|
673
|
+
properties: {
|
|
674
|
+
timeout: {
|
|
675
|
+
type: 'number',
|
|
676
|
+
description: 'Maximum wait time in milliseconds',
|
|
677
|
+
default: 30000,
|
|
678
|
+
},
|
|
679
|
+
idleTime: {
|
|
680
|
+
type: 'number',
|
|
681
|
+
description: 'Time to wait with no active requests (ms)',
|
|
682
|
+
default: 500,
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: 'extract_shadow_dom',
|
|
689
|
+
description: 'Extract content from Shadow DOM elements',
|
|
690
|
+
inputSchema: {
|
|
691
|
+
type: 'object',
|
|
692
|
+
properties: {
|
|
693
|
+
hostSelector: {
|
|
694
|
+
type: 'string',
|
|
695
|
+
description: 'CSS selector for the shadow host element',
|
|
696
|
+
},
|
|
697
|
+
shadowSelector: {
|
|
698
|
+
type: 'string',
|
|
699
|
+
description: 'CSS selector within the shadow root',
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
required: ['hostSelector'],
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
name: 'extract_from_iframe',
|
|
707
|
+
description: 'Extract content from iframe elements',
|
|
708
|
+
inputSchema: {
|
|
709
|
+
type: 'object',
|
|
710
|
+
properties: {
|
|
711
|
+
iframeSelector: {
|
|
712
|
+
type: 'string',
|
|
713
|
+
description: 'CSS selector for the iframe',
|
|
714
|
+
},
|
|
715
|
+
contentSelector: {
|
|
716
|
+
type: 'string',
|
|
717
|
+
description: 'CSS selector for content within iframe',
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
required: ['iframeSelector'],
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: 'detect_modal',
|
|
725
|
+
description: 'Detect if a modal/popup is present on the page',
|
|
726
|
+
inputSchema: {
|
|
727
|
+
type: 'object',
|
|
728
|
+
properties: {
|
|
729
|
+
selectors: {
|
|
730
|
+
type: 'array',
|
|
731
|
+
items: { type: 'string' },
|
|
732
|
+
description: 'CSS selectors to check for modal elements',
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
name: 'close_modal',
|
|
739
|
+
description: 'Attempt to close modal/popup dialogs',
|
|
740
|
+
inputSchema: {
|
|
741
|
+
type: 'object',
|
|
742
|
+
properties: {
|
|
743
|
+
closeButtonSelector: {
|
|
744
|
+
type: 'string',
|
|
745
|
+
description: 'CSS selector for the close button (optional)',
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: 'login',
|
|
752
|
+
description: 'Perform login with username and password',
|
|
753
|
+
inputSchema: {
|
|
754
|
+
type: 'object',
|
|
755
|
+
properties: {
|
|
756
|
+
usernameSelector: {
|
|
757
|
+
type: 'string',
|
|
758
|
+
description: 'CSS selector for username field',
|
|
759
|
+
},
|
|
760
|
+
passwordSelector: {
|
|
761
|
+
type: 'string',
|
|
762
|
+
description: 'CSS selector for password field',
|
|
763
|
+
},
|
|
764
|
+
submitSelector: {
|
|
765
|
+
type: 'string',
|
|
766
|
+
description: 'CSS selector for submit button',
|
|
767
|
+
},
|
|
768
|
+
username: {
|
|
769
|
+
type: 'string',
|
|
770
|
+
description: 'Username to login with',
|
|
771
|
+
},
|
|
772
|
+
password: {
|
|
773
|
+
type: 'string',
|
|
774
|
+
description: 'Password to login with',
|
|
775
|
+
},
|
|
776
|
+
},
|
|
777
|
+
required: ['usernameSelector', 'passwordSelector', 'submitSelector', 'username', 'password'],
|
|
778
|
+
},
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
name: 'save_session',
|
|
782
|
+
description: 'Save browser session (cookies, storage) to file',
|
|
783
|
+
inputSchema: {
|
|
784
|
+
type: 'object',
|
|
785
|
+
properties: {
|
|
786
|
+
filePath: {
|
|
787
|
+
type: 'string',
|
|
788
|
+
description: 'Path where session should be saved',
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
required: ['filePath'],
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: 'load_session',
|
|
796
|
+
description: 'Load browser session (cookies, storage) from file',
|
|
797
|
+
inputSchema: {
|
|
798
|
+
type: 'object',
|
|
799
|
+
properties: {
|
|
800
|
+
filePath: {
|
|
801
|
+
type: 'string',
|
|
802
|
+
description: 'Path to load session from',
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
required: ['filePath'],
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
name: 'keyword_search',
|
|
810
|
+
description: 'Search for keywords in page content and highlight matches',
|
|
811
|
+
inputSchema: {
|
|
812
|
+
type: 'object',
|
|
813
|
+
properties: {
|
|
814
|
+
keywords: {
|
|
815
|
+
type: 'array',
|
|
816
|
+
items: { type: 'string' },
|
|
817
|
+
description: 'Keywords to search for',
|
|
818
|
+
},
|
|
819
|
+
caseSensitive: {
|
|
820
|
+
type: 'boolean',
|
|
821
|
+
description: 'Case sensitive search',
|
|
822
|
+
default: false,
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
required: ['keywords'],
|
|
826
|
+
},
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: 'regex_search',
|
|
830
|
+
description: 'Search page content using regular expressions',
|
|
831
|
+
inputSchema: {
|
|
832
|
+
type: 'object',
|
|
833
|
+
properties: {
|
|
834
|
+
pattern: {
|
|
835
|
+
type: 'string',
|
|
836
|
+
description: 'Regular expression pattern',
|
|
837
|
+
},
|
|
838
|
+
flags: {
|
|
839
|
+
type: 'string',
|
|
840
|
+
description: 'Regex flags (e.g., "gi" for global, case-insensitive)',
|
|
841
|
+
default: 'g',
|
|
842
|
+
},
|
|
843
|
+
},
|
|
844
|
+
required: ['pattern'],
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: 'xpath_query',
|
|
849
|
+
description: 'Execute XPath queries on the page',
|
|
850
|
+
inputSchema: {
|
|
851
|
+
type: 'object',
|
|
852
|
+
properties: {
|
|
853
|
+
xpath: {
|
|
854
|
+
type: 'string',
|
|
855
|
+
description: 'XPath expression',
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
required: ['xpath'],
|
|
859
|
+
},
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: 'take_screenshot',
|
|
863
|
+
description: 'Take a screenshot of the current page or specific element',
|
|
864
|
+
inputSchema: {
|
|
865
|
+
type: 'object',
|
|
866
|
+
properties: {
|
|
867
|
+
path: {
|
|
868
|
+
type: 'string',
|
|
869
|
+
description: 'File path to save screenshot',
|
|
870
|
+
},
|
|
871
|
+
selector: {
|
|
872
|
+
type: 'string',
|
|
873
|
+
description: 'CSS selector for specific element (optional)',
|
|
874
|
+
},
|
|
875
|
+
fullPage: {
|
|
876
|
+
type: 'boolean',
|
|
877
|
+
description: 'Capture full page screenshot',
|
|
878
|
+
default: false,
|
|
879
|
+
},
|
|
880
|
+
},
|
|
881
|
+
required: ['path'],
|
|
882
|
+
},
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: 'generate_pdf',
|
|
886
|
+
description: 'Generate a PDF of the current page',
|
|
887
|
+
inputSchema: {
|
|
888
|
+
type: 'object',
|
|
889
|
+
properties: {
|
|
890
|
+
path: {
|
|
891
|
+
type: 'string',
|
|
892
|
+
description: 'File path to save PDF',
|
|
893
|
+
},
|
|
894
|
+
options: {
|
|
895
|
+
type: 'object',
|
|
896
|
+
description: 'PDF generation options',
|
|
897
|
+
properties: {
|
|
898
|
+
format: { type: 'string', default: 'A4' },
|
|
899
|
+
printBackground: { type: 'boolean', default: true },
|
|
900
|
+
margin: {
|
|
901
|
+
type: 'object',
|
|
902
|
+
properties: {
|
|
903
|
+
top: { type: 'string', default: '10mm' },
|
|
904
|
+
bottom: { type: 'string', default: '10mm' },
|
|
905
|
+
left: { type: 'string', default: '10mm' },
|
|
906
|
+
right: { type: 'string', default: '10mm' },
|
|
907
|
+
},
|
|
908
|
+
},
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
required: ['path'],
|
|
913
|
+
},
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
name: 'classify_content',
|
|
917
|
+
description: 'Classify page content into predefined categories using AI',
|
|
918
|
+
inputSchema: {
|
|
919
|
+
type: 'object',
|
|
920
|
+
properties: {
|
|
921
|
+
categories: {
|
|
922
|
+
type: 'array',
|
|
923
|
+
items: { type: 'string' },
|
|
924
|
+
description: 'List of categories to classify into',
|
|
925
|
+
},
|
|
926
|
+
selector: {
|
|
927
|
+
type: 'string',
|
|
928
|
+
description: 'CSS selector for specific content (optional)',
|
|
929
|
+
},
|
|
930
|
+
},
|
|
931
|
+
required: ['categories'],
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: 'analyze_sentiment',
|
|
936
|
+
description: 'Analyze sentiment of page content (positive/negative/neutral)',
|
|
937
|
+
inputSchema: {
|
|
938
|
+
type: 'object',
|
|
939
|
+
properties: {
|
|
940
|
+
selector: {
|
|
941
|
+
type: 'string',
|
|
942
|
+
description: 'CSS selector for specific content (optional)',
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: 'generate_summary',
|
|
949
|
+
description: 'Generate AI-powered summary of page content',
|
|
950
|
+
inputSchema: {
|
|
951
|
+
type: 'object',
|
|
952
|
+
properties: {
|
|
953
|
+
maxLength: {
|
|
954
|
+
type: 'number',
|
|
955
|
+
description: 'Maximum summary length in characters',
|
|
956
|
+
default: 500,
|
|
957
|
+
},
|
|
958
|
+
selector: {
|
|
959
|
+
type: 'string',
|
|
960
|
+
description: 'CSS selector for specific content (optional)',
|
|
961
|
+
},
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
},
|
|
609
965
|
];
|
|
610
966
|
// Tool categories for organization
|
|
611
967
|
export const TOOL_CATEGORIES = {
|